代码改变世界

死磕mysql(5)

2015-03-19 22:33  我的梦想那么大  阅读(129)  评论(0编辑  收藏  举报

高性能mysql

--查看隐藏的库//use mysql

--创建新用户//create user 'new'@'localhost' identified by '';

--创建用户 '用户名'@'主机/*本地登陆*/' 密码'密码'

mysql> create user 'new'@'localhost' identified by '';
Query OK, 0 rows affected (0.00 sec)

 

*************************** 6. row ***************************
                  Host: localhost
                  User: new
              Password:
           Select_priv: N
           Insert_priv: N
           Update_priv: N
           Delete_priv: N
           Create_priv: N

 

mysql> grant all on *.* to 'new'@'localhost';
Query OK, 0 rows affected (0.03 sec)

--授予全部权限 对于每一个数据库 给'new'@'loalhost'

mysql> revoke select on *.* from 'new'@'localhost';
Query OK, 0 rows affected (0.00 sec)

--修改权限给予查询权限

 

 

http://blog.csdn.net/wulantian/article/details/38230635

详细的权限