root权限连接MySQL后

mysql>use mysql;  


mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY "root";    //为root添加远程连接的能力  


mysql> flush privileges;  

mysql> exit  

mysql>select host,user from user; //查看修改是否成功。