Home  >  Article  >  Database  >  How to change database password using phpMyAdmin

How to change database password using phpMyAdmin

王林
王林Original
2019-12-09 13:25:592138browse

How to change database password using phpMyAdmin

The first step is to click on the user options in phpMyAdmin

How to change database password using phpMyAdmin

Select the root localhost username and click Edit Permissions

How to change database password using phpMyAdmin

At this time, the page for modifying permissions will appear. There are still many options that can be set. Ignore the others for the time being. Drag down and there will be an area to modify the password.

How to change database password using phpMyAdmin

Enter the new password twice. There is a generate button below. This is to generate a new password based on the encryption of the password you currently set. Then your password will be the generated string in the future. If you just want to use the password you set, then don't click the "Generate" button

How to change database password using phpMyAdmin

Here we will use the password you set, and then click Execute

How to change database password using phpMyAdmin

If a prompt that the password has been changed successfully pops up, it means that the password has been changed successfully.

How to change database password using phpMyAdmin

Try to log in with the new password on the client, you can find The password has been changed successfully

How to change database password using phpMyAdmin

The password change is basically completed, but there will be a follow-up problem. I changed the database password. When I exited phpMyAdmin and came in again, I found that the connection could not be connected. Database. This is because the database login information in phpMyAdmin is still the original, so you cannot log in.

How to change database password using phpMyAdmin

Solution:

Open the installation directory of phpMyAdmin. Find the config.inc.php file and open it with Notepad or other text editor

How to change database password using phpMyAdmin

Find $cfg['Servers'][$i]['password' inside ] = '';Change to the new password you just set, save and exit

How to change database password using phpMyAdmin

Open phpMyAdmin again, you can connect normally, and the password change is completed

How to change database password using phpMyAdmin

Recommended related articles and tutorials: phpmyadmin tutorial

The above is the detailed content of How to change database password using phpMyAdmin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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