mysql> select host,user,password from user;

mysql添加远程连接权限

  • 想用本地IP登录,那么可以将以上的Host值改为自己的Ip即可。
  • 这里有多个root,对应着不同场景。(后期研究为什么mysql表有多个root)

给远程连接授权

mysql> use mysql;
Database changed

mysql> grant all privileges  on *.* to root@'%' identified by "root";
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> select host,user,password from user;

mysql添加远程连接权限

最后远程能用root\root登录了,但是本地只能用空密码登录了,权限也不一样。留个TO-DO。


参考

https://www.cnblogs.com/weifeng1463/p/7941625.html

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2022-01-04
  • 2022-12-23
  • 2022-02-18
猜你喜欢
  • 2022-03-09
  • 2021-08-24
  • 2022-01-08
  • 2022-12-23
  • 2021-12-12
  • 2022-01-16
  • 2022-12-23
相关资源
相似解决方案