mysql各种错误代码与解决方案

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_31424825/article/details/84372764

作者:LoveEmperor-王子様

mysql各种错误代码与解决方案

  • 错误代码2003: ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
    解决: 右键“计算机(我的电脑)”点击“管理”, 然后点击“服务和应用程序”,双击“服务”,找到MySql的服务,右键 启动就可以了。

  • ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO) 进入MySQL时:
    进入安装目录bin文件下,输入mysql -u root -p就可以不用密码登录了,出现password:的时候直接回车可以进入。去修改密码。

  • 1449 : The user specified as a definer ('root'@'%') does not exist移植视图时:
    grant all privileges on *.* to root@"%" identified by ".";
    flush privileges;

  • ERROR 1054 (42S22): Unknown column 'password' in 'field list'修改密码时:

    • 新安装的MySQL5.7,登录时提示密码错误,安装的时候并没有更改密码,后来通过免密码登录的方式更改密码,输入update mysql.user set password=password(‘root’) where user='root’时提示ERROR 1054 (42S22): Unknown column ‘password’ in ‘field list’,原来是mysql数据库下已经没有password这个字段了,password字段改成了:authentication_string:
    • 所以更改语句替换为update mysql.user set authentication_string=password('root') where user='root' ;即可;注意标点符号
  • ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement:
    去掉my.imi文件里的:skip-grant-tables,重启mysql。

  • ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value:
    正确的添加用户方法:
    GRANT USAGE ON *.* TO 'user01'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;

猜你喜欢

转载自blog.csdn.net/qq_31424825/article/details/84372764