授权命令:

  1.全部权限:grant all on *.* to user@192.168.10.2 identified by "pass";

  2.部分权限:grant select,insert into on *.* to user@192.168.10.2 identified by "pass"

查看用户授权表: 

  select user,host,password from mysql.user;

      mysql下默认存在mysql数据库,里边的user表存储着用户和授权信息。

=======================================

遇到的问题:本地的navicat链接不上我虚拟机的mysql

解决:需要虚拟机的mysql授权给本地的ip:grant all on *.* to user@192.168.64.21 identified by "pass";

相关文章:

  • 2021-09-07
  • 2021-09-04
  • 2021-10-21
  • 2021-09-07
  • 2022-12-23
  • 2021-09-07
  • 2021-09-07
  • 2021-09-07
猜你喜欢
  • 2021-09-07
  • 2021-09-07
  • 2021-05-28
  • 2022-12-23
  • 2022-01-07
相关资源
相似解决方案