Mysql user management and permissions, mysql user management Permissions
1. Set the password
Set password for username @ localhost = password ('Password ');
2. Cancel the password
Set password for username @ localhost = password ('');
3. Create an account
Create user admin identified by '20140901 ';
Create user 'admin' @ '%' identified by '201312 ';
4. delete an account
Delete from mysql. user where user = user name;
Drop user Username;
5. Authorize and create an account
Grant all privileges on *. * to username @ localhost; -- create an empty password user that can only log on locally
Grant all privileges on *. * to 'username' @ localhost identified by password; -- create a user that can only log on locally
Grant all privileges on *. * to 'username '@' % ': -- creates a user that can log on remotely.
6. revoke permissions
Revoke all privileges on *. * from 'username' @ '% ':