错误:ERROR 2003 (HY000): Can't connect to MySQL server on... 解决办法: 1,默认情况下Mysql只允许本地登录,所以需要修改配置文件将地址绑定给注释掉: $sudo vi /etc/mysql/my.cnf #bind-address = 127.0.0.1
错误:ERROR 2003 (HY000): Can't connect to MySQL server on... 解决办法: 1,默认情况下Mysql只允许本地登录,所以需要修改配置文件将地址绑定给注释掉: $sudo vi /etc/mysql/my.cnf #bind-address = 127.0.0.1 <---注释掉这一行就可以远程登录了 2,然后sudo service mysql restart 重启动。可以连接了