禁止:
1、进入mysql;
2、
mysql> use mysql;
3、执行修改权限语句(禁用);
mysql> update user set host = "localhost" where user = "root" and host = "%";
4、刷新权限;
mysql> plush privileges;
启用:
1、进入mysql;
2、
mysql> use mysql;
3、执行修改权限语句(启用);
mysql> update user set host = "%" where user = "root";
4、刷新权限;
mysql> plush privileges;
添加远程用户:
1、进入MySQL;
2、
mysql> use mysql;
3、执行添加语句(启用);
mysql> create user ‘test‘@‘%‘ identified by ‘Test@2020‘;