mysql不能通过ip连接

mysql -uroot -p123456

grant all privileges on *.* to 'root'@'%' identified by '123456';
flush privileges;

vim /etc/mysql/mysql.conf.d/mysqld.cnf

修改或添加 bind-address = 10.225.20.20

service mysql restart

原文地址:https://www.cnblogs.com/wsswlyy/p/9045079.html