1. Create a database:
Go to the phpMyAdmin Management page, find the text "Create a new database", enter the name of the database to be created below, and select the database encoding from the drop-down list, generally, it is "gb2312_chinese_bin". Click "CREATE" to create a database.
2. Create an account for this database
On the phpMyAdmin Management page, click "Permissions" to open the link and click "Add new user". On the displayed page, you will see "Logon Information" and enter the user name and host (generally local: localhost), password, because we want to assign permissions for a single database to a single user, so we do not select "Global Permissions" here ", click the "execute" button at the bottom to create a new user name.
3. Add the database permission to the new user
After a user is added, the system prompts "you have added a new user" at the top of the management interface. Now, we can add permissions to the new user, find "specify permissions by Database" below, click the drop-down list after "add permissions to the following Database", select a database, and select all the data below, then, select the check boxes except the bottom three for the structure. Do not select any other check boxes. Then, click the "execute" button to configure the permissions for the user to fully manage the database.
Note: we only need to grant this user all the permissions to manage this database, but we do not have the management permissions for other databases. Therefore, you must pay attention to the configuration permissions.
Note: The user permissions displayed in phpMyAdmin are in English. We will attach a Chinese translation here:
Data:
Select: allows reading data.
Insert: data can be inserted or replaced.
Updata: allows you to change data.
Delete: allows you to delete data.
File: allows you to import data from a file and export data to a file.
Structure:
Create: allows the creation of new databases and tables.
Alter: allows you to modify the structure of an existing table.
Index: allows you to create and delete indexes.
Drop: allows you to delete databases and tables.
Create temporary tables: allows the creation of temporary tables.
Create view: allows the creation of new comments.
Show view: displays the created view.
Create routine: allows the creation of stored procedures.
Alter routine: allows changing and dropping stored procedures.
Execute: allows execution of stored procedures.
Management:
GRANT: Users and permissions can be added, but the permission table cannot be reloaded.
Super: connection is allowed when the maximum allowed number is reached.
Process: allows you to view complete queries in the process list.
Reload: allows you to reload server settings and refresh the server cache.
Shutdown: Allows server shutdown.
Show databases: allows access to the complete database list.
Lock tables: The table that allows the current clue to be locked.
References: Invalid in MySQL of this version.
Replication client: the user has the right to ask where the submitter/controller is.
Replication slave: required to reply to the submitter.
Create user: allows you to create, drop, and rename user accounts.