vim /etc/mysql/my.cnf
# 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
<---注释掉这一行就可以远程登录了
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address