1 -- 登录
 2 mysql -u root -p
 3 -- 查询mysql用户
 4 select user,host,authentication_string from mysql.user;
 5 -- 切换到mysql库
 6 use mysql;
 7 -- 修改root用户host
 8 update user set host='%' where user='root';
 9 -- 授权
10 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
11 -- 刷新
12 FLUSH PRIVILEGES;

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2021-12-20
  • 2021-06-01
  • 2021-12-04
  • 2022-12-23
  • 2021-11-22
猜你喜欢
  • 2022-01-07
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2021-11-27
  • 2021-12-28
  • 2021-08-11
相关资源
相似解决方案