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’;
也可以让权限细化一些 Category: 数据库 Tags: grant, MySQL Leave a reply
注意授权后必须FLUSH PRIVILEGES;否则无法立即生效