错误原因:MySQL不允许远程登录。 解决方法如下: 在mysql中执行 use mysql;update user set host = ‘%’ where user = ‘root’;FLUSH PRIVILEGES;