I. Wamp version
I am using the WampServer2.2a-x32.exe version of the installer.
Ii. Problem Description
After Wamp is installed, the default password of the MySQL database is blank. However, for some reason, we may want to modify the password of the database.
3. Solution steps
1. Go to the phpMyAdmin page and select the MySQL database on the left, as shown in)
Go to phpMyAdmin
Select MySQL database
2. Go to the SQL page, as shown in)
3. Enter the following SQL statement (assume that the password is changed to 123456)
SQL statement for changing the password: update user SET Password = PASSWORD ('000000') where user = 'root'
Click execute, as shown in)
4. search for config In the Wamp installation directory. inc. open the PHP file, and set $ cfg ['servers'] [$ I] ['Password'] = ''; change to $ cfg ['servers'] [$ I] ['Password'] = '000000', as shown in)
5. Restart Wamp
After completing this step, the database password will be successfully changed to 123456!
6. Possible Problems
If you have manually modified the Database Password or modified the password by referring to other information on the Internet, but the phpMyAdmin page cannot be displayed properly, the following error is prompted:
1045-Access denied for user 'root' @ 'localhost' (using password: Yes)
Or
#2000-mysqlnd cannot connect to MySQL 4.1 + using the old insecure authentication. Please use an administration tool to reset your password with the command set password = PASSWORD ('your _ existing_password ').
We recommend that you reinstall Wamp and then follow the steps above to change the password.
Of course, if you find that the phpMyAdmin page still displays the same error after the reinstallation is complete, remember to clear the browser cache (I am suffering this problem for a long time )!
Finally, I wish you a successful password change ~