mysql5.7

安装完Mysql5.7后,需要修改密码

[root@master01~]# cat /var/log/mysqld.log |grep pass
2019-03-01T05:45:44.116858Z 1 [Note] A temporary password is generated for root@localhost: 4dh>eN&?u

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

mysql> SET PASSWORD = PASSWORD('You_password');
Query OK, 0 rows affected, 1 warning (0.01 sec)

  

 

posted @ 2019-03-07 15:34  呆呆114  阅读(101)  评论(0)    收藏  举报