资讯

展开

mysql 5.7 版本You must reset your password using ALTER USER statement before executing this statement

作者:快盘下载 人气:

经过不懈努力安装成功mysql 5.7.27 ,但是登录mysql后发现执行任何语句都是报错。根据提示:需要使用ALTER USER模式修改一下默认密码,因为mysql5.7安装的时候初始化有一个密码,密码比较复杂。修改改密码才可以用。修改后即可查看。


mysql> show databaes;

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'databaes' at line 1

mysql> 

mysql> 

mysql> select version();

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> 

mysql> use mysql;

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

mysql> set password=password("yourpasswd");

Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql> select version();

+-----------+

| version() |

+-----------+

| 5.7.27    |

+-----------+

1 row in set (0.01 sec)


加载全部内容

相关教程
猜你喜欢
用户评论
快盘暂不提供评论功能!