1.问题
MySQL登录时出现 Access denied for user ‘root’@‘xxx.xxx.xxx.xxx’ (using password: YES) 的原因及解决办法
2.解决方案
1. 先用localhost登录
mysql -u root -p
Enter password: XXXX
2. 执行授权命令
mysql> grant all privileges on *.* to root@'%' identified by 'pass123';
3. 退出再试
mysql> quit
3.远程登录
mysql -h 192.168.0.1 -u root -p