One, Wamp version
I'm using the installer for this version of Wampserver2.2a-x32.exe.
Ii. Description of the problem
After installing Wamp, the MySQL database default password is empty, but for some reason we may want to modify the password for the database.
Third, the solution steps
1. Go to the phpMyAdmin page and select the MySQL database on the left (as shown)
Enter phpMyAdmin
Select MySQL Database
2. Then go to the SQL page (as shown)
3. Enter the following SQL statement (this assumes that the password is modified to 123456)
SQL statement to modify password: Update user set Password=password (' 123456 ') where user= ' root '
Then click Execute (as shown)
4. Search for the config.inc.php file in the Wamp installation directory, open it, and will $cfg [' Servers '] [$i] [' password '] = '; modified to $cfg [' Servers '] [$i] [' password '] = ' 123456 '; (as shown)
5. Restart Wamp
After this step, the database password will be successfully modified to 123456!
6. Problems that may arise
If you have previously manually modified the password of the database, or reference some other information on the network, changed the password, but found that the phpMyAdmin page does not display properly, the following error:
1045-access denied for user ' root ' @ ' localhost ' (using Password:yes)
Or
#2000-mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. Administration tool to reset your password with the command SET password = password (' Your_existing_password ' ).
It is recommended that you reinstall Wamp, and then follow the steps above to modify the password.
Of course, if you find that the phpMyAdmin page still shows the same error after reloading, remember to clear the browser cache (I was tortured for a while)!
Finally, I wish you a successful change password ~
wamp--using phpMyAdmin to modify the database password