1) Delete User
Delete from user where user= ' sss ' and host= ' localhost ';
Drop User SSS
Flush Privileges
2) New User
CREATE USER ' user_name ' @ ' host ' identified by ' password ';
USER_NAME: To create the user's name.
Host: Indicates to which machine this newly created user is allowed to log on, if only allow login from local, then fill ' localhost ', if allow remote login, then fill '% '
Password: Newly created user's login database password, if no password can not write.
===
For example CREATE USER ' chunilla ' @ '% ' identified by ' Chunillachunilla '
3) Authorized users
Command: GRANT privileges on databasename.tablename to ' username ' @ ' host '
Privileges: Indicates what power to grant, such as SELECT, Insert, delete,update, etc., if you want to grant full power, fill all
Databasename.tablename: Indicates which table in which library the user's permissions can be used, and if the user's permissions are applied to all tables in all databases, fill in .* is a wildcard, which means all.
' username ' @ ' host ': Indicates which user is authorized.
===
For example, grant Select on circle.* to ' chunilla ' @ '% '
MySQL user Delete, add and authorize