Create a database and independent database account with phpMyadmin_PHP tutorial

WBOY
Release: 2016-07-15 13:22:55
Original
837 people have browsed it

Generally speaking, there is more than one website on a server, and more than one MySQL (the best combination with PHP) database. In order to prevent security risks, we generally set up an independent database access account for each database, and this account only has permission to access the database.

下载地址:    PHPMyadmin

Let us demonstrate it in detail:
1. First we need to log in to phpMyAdmin.
2. Create a database, as shown below. In the right window of phpMyAdmin, fill in the database name and click Create.

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 1


For example, here we create a database named: cncmstest
If the creation is successful, there will be The following prompts:

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 2


3. Click the home button in the upper left corner to return to php (as now Mainstream development language) MyAdmin main interface:

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 3


4. Click " on the right side of the main interface Permissions" to create a database account.

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 4


5. In the permissions page, we click "Add New User"

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 5


6. In this page, we fill in the database user name to be created and the access scope of the user. and password.

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 6


As shown above, we filled in the user name: cncmsuser. This database user only allows this user. For computer access, select local for host; we use automatically generated passwords. Click "Generate" below to generate a random password, and then click "Copy" to automatically fill in the password box.
Don’t select any of the boxes below, just scroll to the bottom of the page and click Execute to create a new user.
If the database user is successfully created, the following page will be returned:

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 7


7. The most important In the first step, set the database access permissions of the user
You can set the permissions directly on the page returned after the database user is successfully added. Here we choose to specify permissions by database:

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 8


As shown above, select what we just did in the database list The created cncmstest will automatically enter the permission setting page of the database.

Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with Create a database and independent database account with phpMyadmin_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial_PHP tutorial


Figure 9


In the permission settings in the above figure, we combine "data" and "structure" Select all column permissions and leave none of the management permissions selected. Just click Execute.
At this point, we have completed all settings, created a database: cncmstest, and created the database user cncmsuser, specifically specifying that the user only has access rights to cncmstest. In this way, we achieve the purpose we talked about at the beginning: specifying independent user access rights for each database.


www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/446946.htmlTechArticle Generally speaking, there is more than one site on a server, and more than one MySQL (the best combination with PHP )database. In order to prevent security risks, we generally set up...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template