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, for example, "utf8_general_ci", 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:
1. Because we only want to give this user all the permissions to manage this database, but we do not have the management permissions for other databases, we must pay attention when configuring permissions.
2. information_schema is an information database that stores information about all other databases maintained by the MySQL server. If you do not want to display it in phpMyAdmin, you only need to set it in config. inc. PHP (some are config. default. set $ cfg ['servers'] [$ I] ['hide _ db'] = 'information _ scheme'. In addition, if you select the "grant all permissions to a database starting with username _ (USERNAME \ _ %)" option in "User Database" When innovating users, the new user can create a database starting with "username.
This is already in the home of scripts.ArticleBut because the text description of this article is more detailed than the original one, it is more effective to combine the two articles.
Use phpMyAdmin to create a MySQL database and an independent database account