To learn about MySQL databases, you must first set MySQL user permissions. The following describes how to set MySQL user permissions.
1. Log On As the root user or another user with MySQL user permissions.
2. The following command creates a test user with the password test and can only operate on the picture database.
Mysql> grant all on picture. * TO test identified by "test ";
The syntax of the GRANT statement looks like this:
GRANT privileges (columns) ON what TO user identified by "password" WITH GRANT OPTION
To use this statement, you must enter the following parts:
Privileges grants MySQL user permissions. The following table lists the MySQL user permission specifiers that can be used for GRANT statements:
Operation permitted by the permission specified character
Alter table and Index
Create Database and table Creation
Delete existing records in the table
Drop discard delete) databases and tables
Create or discard an INDEX
Insert a new row into the table
REFERENCE unused
Select to retrieve records in a table
Update modify existing table records
FILE: reads or writes files on the server.
PROCESS: View information about the thread executed on the server or kill the thread.
RELOAD: RELOAD the authorization table or clear logs, host caches, or table caches.
SHUTDOWN the server
ALL; all privileges Synonyms
USAGE special "no permission" permission
The table above shows that the permission specifiers in the first group apply to databases, tables, and columns, and the second group manages permissions. Generally, these are relatively strictly authorized because they allow users to affect server operations. The third group has special permissions. "ALL" means "ALL Permissions", and "UASGE" means "no Permissions", that is, creating users, but not granting permissions.
Troubleshooting of MySQL query timeout
How to delete duplicate records in MySQL
About MySQL query Cache Mechanism
Use MySQL temporary tables to accelerate queries
How to properly use MySQL Indexes