use mysql;
update db set host = '%' where user = 'root';
flush privileges;
grant all privileges on . to 'root'@'%' identified by '123456' with grant option;
修改ip
vim /etc/mysql/my.cnf
重启服务
service mysql restart
use mysql;
update db set host = '%' where user = 'root';
flush privileges;
grant all privileges on . to 'root'@'%' identified by '123456' with grant option;
vim /etc/mysql/my.cnf
service mysql restart
本文标题:mysql允许远程连接
本文链接:https://www.haomeiwen.com/subject/hgiqhxtx.html
网友评论