mysql之用户受权

受权命令:mysql

1.所有权限:grant all on *.* to user@192.168.10.2 identified by "pass";sql

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

查看用户受权表: ide

  select user,host,password from mysql.user;ip

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

=======================================虚拟机

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

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

相关文章
相关标签/搜索