解决远程访问Mysql失败的问题
适用版本:mysql5.6
操作系统:centos
[root@localhost /]# mysql -u root mysql
mysql>use mysql;
mysql>desc user;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root"; #为root添加远程连接的能力。
mysql>update user set Password = password('yourpassword') where User='root';
mysql>select Host,User,Password from user where User='root';
mysql>flush privileges;
mysql>exit