所以除了给账户权限以外 还有修改 /etc/mysql/my.cnf 找到 bind-address = 127.0.0.1 修改为 bind-address = 0.0.0.0 重启mysql : sudo /etc/init.d/mysql restart
否则会报 ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111)
好吧 我是mysql菜鸟 以前都是走localhost的
所以除了给账户权限以外 还有修改 /etc/mysql/my.cnf 找到 bind-address = 127.0.0.1 修改为 bind-address = 0.0.0.0 重启mysql : sudo /etc/init.d/mysql restart
否则会报 ERROR 2003 (HY000): Can't connect to MySQL server on 'x.x.x.x' (111)
好吧 我是mysql菜鸟 以前都是走localhost的