Mysql grant 授权

Posted by – 2009-02-24

这条语句老是忘,也老是忘了做笔记,这次终于想起记了。

mysql> grant all privileges on databasename.* to databaseuser@ip_address identified by 'databasepassword' with grant option;

这是让用户databaseuser在ip_address位置对数据库databasename拥有所有权限,用户databaseuser的密码是databasepassword

mysql> grant select,insert,update,create,drop on databasename.* to databaseuser@ip_address identified by 'databasepassword';

也可以让权限细化一些

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>