Home >Database >phpMyAdmin >How to change database password using phpMyAdmin
The first step is to click on the user options in phpMyAdmin
Select the root localhost username and click Edit Permissions
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.
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
Here we will use the password you set, and then click Execute
If a prompt that the password has been changed successfully pops up, it means that the password has been changed successfully.
Try to log in with the new password on the client, you can find The password has been changed successfully
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.
Solution:
Open the installation directory of phpMyAdmin. Find the config.inc.php file and open it with Notepad or other text editor
Find $cfg['Servers'][$i]['password' inside ] = '';Change to the new password you just set, save and exit
Open phpMyAdmin again, you can connect normally, and the password change is completed
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!