use mysql; select host,user from user; 由此可见root没有远程连接权限 Grant all privileges on *.* to 'root'@'%' identified by '密码' with grant option; (%表示是所有的外部机器,如果指定某一台机,就将%改为相应的机器名;‘root’则是指要使用的用户名,) 转载于:https://blog.51cto.com/chentianwang/1740926