当前位置:Gxlcms > 数据库问题 > MySQL中的错误及解决方法

MySQL中的错误及解决方法

时间:2021-07-01 10:21:17 帮助过:1人阅读

 

错误原因:mysql数据库下已经没有password这个字段了,password字段改成了authentication_string。

解决方法:

  •        从Mysql解压路径中找到my.ini配置文件,将其中的skip-grant-tables注释去掉,如果没有就自己加上去(一般都有的),如图:
    技术分享

     

  •   在mysql命令行下执行以下命令(password修改为自己的密码即可):
    mysql>  update mysql.user set authentication_string=PASSWORD(‘password‘) where Use
    r=‘root‘;
    

      结果为这样:

    Query OK, 1 row affected, 1 warning (0.15 sec)
    Rows matched: 1  Changed: 1  Warnings: 1
    

      

  • 运行完回到mysql解压路径下,将my.ini配置文件中的skip-grant-tables再次注释掉(在前面加个#就行了)
  • 最后,重启MYSQL。
  • OK 

MySQL中的错误及解决方法

标签:pass   span   bsp   tables   com   where   修改   word   ges   

人气教程排行