[MySQL] 授权用户远程登陆
2022-07-04 本文已影响0人
長得太帥忚四種檌
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;