- 论坛徽章:
- 0
|
mysql> grant all privileges on *.* to
[email='mysql'@'localhost']'mysql'@'localhost'[/email]
;
给mysql用户授予localhost机器上的所有数据库的所有权限。
mysql> grant usage on *.* to
[email='user'@'localhost']'user'@'localhost'[/email]
;
给user用户授予localhost机器上的所有数据库的使用权限。
mysql> grant select,insert,update,delete,create,drop on aa.* to
[email='user'@'localhost']'user'@'localhost'[/email]
identified by 'bb';
给user用户授予localhost机器上的aa数据库 select,insert,update,delete,create,drop 的权限,密码为bb。
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/101226/showart_2005959.html |
|