解决centos7报错ERROR 1045 (28000): Access denied for user ‘root’
【问题】: mysql版本:5.7.13 首次在centos下安装mysql,客户端连接mysql时报错: [plain]view plain copy [root@localhostopt]#/usr/bin/mysql-uroot ERROR1045(28000):Accessdeniedforuser'root'@'localhost'(usingpassword:NO) 【解决】: 1、找到密码 [plain]view plain copy [root@localhostopt]#cat/var/log/mysqld.log|greppassword 2016-07-16T05:01:47.771362Z1[Note]Atemporarypasswordisgeneratedforroot@localhost:q.)aq!YaH6y- 2016-07-16T05:02:32.000199Z2[Note]Accessdeniedforuser'root'@'localhost'(usingpassword:NO) 2016-07-16T05:02:39.063852...
.png)
.png)