还是请楼主多参考mysql手册及其它帖子!例子: 1. grant all on *.* to rootshoulou@'localhost' identified by 'shoulou' 对所有数据库拥有所有权限(不包括grant权限),但是只能通过localhost访问,例如在mysql客户端不能使用如下命令访问: mysql -h mysql-svr-ip -urootshoulou -pshoulou,需要将-h mysql-svr-ip去掉其它的情况自己多练习吧
1. grant all on *.* to rootshoulou@'localhost' identified by 'shoulou' with grant option2. grant all on *.* to rootshoulou@'%' identified by 'shoulou'这两条语句给了用户rootshoulou的最高权限,其中每个选项的具体含义就说不完了,楼主,不好意思,只能自己研究了
1. grant all on *.* to rootshoulou@'localhost' identified by 'shoulou' with grant option2. 1. grant all on *.* to rootshoulou@'localhost' identified by 'shoulou'上述两条语句给了rootshoulou最高权限!每个选项的含义请参考手册或其它帖子
1. grant all on *.* to rootshoulou@'localhost' identified by 'shoulou'
对所有数据库拥有所有权限(不包括grant权限),但是只能通过localhost访问,例如在mysql客户端不能使用如下命令访问:
mysql -h mysql-svr-ip -urootshoulou -pshoulou,需要将-h mysql-svr-ip去掉其它的情况自己多练习吧