编辑my.cnf
bind-address = 0.0.0.0
mysql5.x远程登录操作,其中ip为允许远程的地址,password为密码:
GRANT ALL PRIVILEGES ON . TO ‘root’@‘ip’ IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
mysql8.x远程登录操作,其中ip为允许远程的地址,password为密码:
use mysql;
select host,user from user;
update user set host=‘%’ where user=‘root’;
修改为全部
flush privileges;
刷新
1万+

被折叠的 条评论
为什么被折叠?



