Fifth. Permission system in MySQL database
MySQL database service is a white list of permissions policy, that is, explicitly specify which users can do what, but not explicitly specify what some users can not do, the authentication of permissions is mainly through the MySQL library of several data dictionary tables, to achieve different granularity of the permission requirements.
1. Permission granting and recycling
In the MySQL database for the grant and release of user rights is more flexible, can be either through a dedicated command, or directly manipulate the dictionary to achieve
Create user
Create user JSS;
Delete User
Drop user "JSS" @ "%";
Set Password
Set password for Jss=password (' 111111 ');
Create a user and set a password
Create user [email protected] ' 127.0.0.1 ' identified by ' 111111 ';
Greant Select on Library name. Table name to ' user ' @ ' IP ' identified by ' passwd ';
Greant all on the library name. Table name to ' user ' @ ' IP ' identified by ' passwd ';
Mysql_ Smudge Notes-fifth chapter on the permissions system in MySQL database