mysql之用户授权

授权命令:

  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";

posted @ 2013-09-30 17:40  leezhxing  阅读(313)  评论(0编辑  收藏  举报