First, we need to log on to the php Tutorial (as the mainstream development language) MyAdmin without demonstration.
2. Create a database tutorial, as shown in the following figure. Fill in the database name in the right window of "MyAdmin" in php (as the current mainstream development language) and click "Create.
For example, here we create a database named cncmstest
If the creation is successful, the following message is displayed:
3. Click the home button in the upper left corner to return to the main interface of "MyAdmin" in php (as the mainstream development language:
4. Click "permission" on the right of the main interface to create a database account.
5. On the permission page, click "add new user"
6. On this page, enter the username, access range, and password of the database to be created.
As shown in the preceding figure, the user name is cncmsuser. This database user only allows access from the local machine, and the host user selects the local user. The password is automatically generated, click "Generate" below to Generate a random password, and then click "Copy" to automatically fill in the password box.
If none of the following boxes is selected, you can directly pull them to the bottom of the page to create a new user.
If the database user is created successfully, the following page is returned:
7. The most important step is to set the user's database access permissions.
You can directly set permissions on the page returned when the database user is successfully added. Here we choose to specify permissions by database:
As shown in the figure above, select the cncmstest we just created in the database list to automatically go to the permission settings page of the database.
In the permission settings shown in the preceding figure, we select all the permissions in the "data" and "structure" columns, and do not select any management permissions. Click to execute.
By now, we have all set up, created a database: cncmstest, and created the database user cncmsuser, specifically specifying that the user only has access to cncmstest. In this way, we can achieve our goal at the beginning: to specify independent user access permissions for each database.