我们专注服务于当下互联网基础设施建设与云计算、大数据时代的各种需求!

mysql-5.7密码

1.默认随机密码会过期,提示如下

mysql> show databases;
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.

解决办法:

2.SET PASSWORD = PASSWORD(‘your new password‘);

3. ALTER USER ‘root’@’localhost’ PASSWORD EXPIRE NEVER;

4.flush privileges;

 

收工!