ubuntu开启mysql外部访问
1. 改表法
mysql -uroot -prootmysql>use mysql;
mysql>udpate user set host='%' where user='root';
mysql>select host,user from user wher user='root';
mysql>flush privileges;ubuntu还要改一下mysql.conf.d
#bind-address = 127.0.0.1service mysql restart如果连不上就用授权法
2. 授权法
mysql -uroot -prootGRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;
FLUSH PRIVILEGES;ubuntu开启mysql外部访问
http://blog.icy8.cn/posts/21614/