Skip to content

Mysql 开启远程连接

L edited this page Oct 10, 2020 · 3 revisions

登录远程服务器
运行MySQL x.x Command Line Client,输入密码
分别执行下面三个语句

use mysql
update user set host = '%' where user = 'root';
FLUSH PRIVILEGES;

不需要重启MySQL服务
查询语句

select host,user from user;

执行结果如图
_EKD@_3OHP2N05TDF7D$IFT

参考资料

mysql开启远程连接

Clone this wiki locally