Access denied for user 'root'@'localhost'问题的解决

mysql> grant all privileges on *.* to root@'localhost' identified by '密码';
mysql> flush privileges;

# 或者

mysql> grant all privileges on *.* to root@'%' identified by '密码';
mysql> flush privileges;
原文地址:https://www.cnblogs.com/armyant/p/11710209.html