如果你想连接你的mysql的时候发生这个错误:

ERROR 1130: Host '192.168.1.105' is not allowed to connect to this MySQL server
解决的方法有:
  • 改表法

    可能是你的帐号不允许从远程登陆,在服务器端的数据库中的 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%"
      update user set host = '%' where user = 'root';
  • 授权法

    GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'pwd' WITH GRANT OPTION;