Access denied for user 'root'@'localhost' (using password:YES) 解决方案
在终端按步执行以下命令:
/etc/init.d/mysql stop
mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
mysql -u root mysql
update mysql.user set authentication_string=password('密码') where user='root';
FLUSH PRIVILEGES;
quit
/etc/init.d/mysql restart
mysql -uroot -p
Enter password: 密码

浙公网安备 33010602011771号