若问生涯原是梦,除梦里,没人知。

解决Ubuntu远程连接mysql连不上的问题

mysql

原因:Ubuntu竟然在mysql的配置文件中默认绑定了本机。

解决方案:果断给注释掉。编辑配置文件/etc/mysql/my.cnf,注释掉里边的bind-address配置项。

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1

重启mysql

service mysql restart

目录[+]