1.
Q:当执行mysql -u root -p进入<mysql>后,执行use mysql,提示Access denied错误
A:
vim /etc/my.cnf
在[mysqld] 下面加上:
skip-grant-tables配置项。(临时忽略密码)
2.
Q:use mysql进入后,给root用户提供远程登陆的权限
A:grant all privileges on *.* to 'root'@'%' identified by <password> with grant option
3.(待解决)
Q:skip-grant-tables配置项一旦去掉后,远程连接就无法连接,这样安全性会有问题,侧面说明password设置还是有问题!