1.更改用户的访问地址为允许所有IP
update user set host = '%' where user = 'root';
2.授权
GRANT ALL PRIVILEGES ON *.* TO "root"@"%";
3.刷新权限
flush privileges;
update user set host = '%' where user = 'root';
GRANT ALL PRIVILEGES ON *.* TO "root"@"%";
flush privileges;
本文标题:[MySQL] 授权用户远程登陆
本文链接:https://www.haomeiwen.com/subject/xoszzltx.html
网友评论