ERROR 1130: Host ... is not allowed to connect to this MySQL server
说明所连接的用户帐号没有远程连接的权限,只能在本机(localhost)登录。 需更改 mysql 数据库里的 user表里的 host项
把localhost改称%
具体步骤:登陆到MySQL 首先 use mysql;

use mysql;
mysql> select host from user where user = 'root';

查看下数据库的host信息如下:

mysql> select host from user where user = 'root';
+------+
| host |
+------+
| %    |
+------+
1 row in set (0.00 sec)

最后

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)