远程连接MySql

将用户中的host改为%

update user set host = '%' where user = 'root';

进行授权

GRANT ALL PRIVILEGES ON *.* TO root@'%';

刷新

FLUSH PRIVILEGES

在建立连接的时候host设为mysql表所在的主机ip

posted @ 2021-01-15 16:55  小帆敲代码  阅读(63)  评论(0编辑  收藏  举报