ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决

环境:Ubuntu 16.0.4  + mysql-server-5.7

安装Ralph3的时候出现这个问题,1个多小时终于解决了,睡醒到单位再装,这问题没出现 ,抓狂

cat /etc/mysql/debian.cnf

使用[client]节提供的用户名和密码:

# mysql -udebian-sys-maint -p 

Enter password: <输入[client]节的密码> 

mysql> UPDATE user SET authentication_string=password('newpassword') where USER='root';

mysql> FLUSH PRIVILEGES; 

mysql> quit 

# mysql -u root -p 

Enter password: <输入新设的密码newpassword> 

mysql> 

你可能感兴趣的:(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) 解决)