码迷,mamicode.com
首页 > 数据库 > 详细

mysql权限

时间:2015-03-07 17:04:27      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:

允许myuser使用mypassword从任何主机连接到mysql服务器
GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘%‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
FLUSH PRIVILEGES;

 

允许用户myuser从ip为10.22.4.45的主机连接到mysql服务器,并使用mypassword作为密码
GRANT ALL PRIVILEGES ON *.* TO ‘myuser‘@‘10.22.4.45‘ IDENTIFIED BY ‘mypassword‘ WITH GRANT OPTION;
FLUASH PRIVILEGES;

 

允许myuser从ip为10.22.4.45的主机连接到mysql服务器的test数据库,并使用mypassword作为密码;
GRANT ALL PRIVILEGES ON test.* TO ‘myuser‘@‘10.22.4.45‘ IDENTIFIED BY ‘mysqlpassword‘ WITH GRANT OPTION;
FLUSH PRIVILEGES;

mysql权限

标签:

原文地址:http://www.cnblogs.com/nzbbody/p/4320567.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!