One is directly modified by phpMyAdmin, and the other is by using Wamp's MySQL console.The first type:① in the phpMyAdmin interface, click "User", the user profile of all users named "root" user's password is changed to "Password to change." Modify is to click "Edit Permissions", set the password can be. At this point you can easily make a mistake: we have changed the password and forgot to remember the encrypted password. The following "Password to modify" is actually encrypted after the password!!! ② Locate the "config.inc.php" file under the phpMyAdmin folder under directory Wamp\apps, modify "$cfg [' Servers '] [$i] [' password '] = '", $cfg [' Servers '] [$i] [' password '] = ' password to be modified ';. If you don't have this sentence, add it yourself. Restart the service. PS: The first kind of personal feeling is not reliable, because after the change to log in is the use of encrypted password login. This loses the good remembered function. Who remembers such a complicated password?The second type:Note: MySQL statement input must end with a semicolon to be valid! ① Open Wamp MySQL console, prompt for password, start password is empty, press ENTER directly ② enter "use MySQL", console prompt "Database changed" ③ input "update user set Password=password (' The password to be modified ') where user= ' root '; ", console Prompt" Query ok,xxxxxxxxx "④ last enter" flush privileges; ", Commit ⑤ Input" quit ", exit. ⑥ Locate the "config.inc.php" file under the phpMyAdmin folder under directory Wamp\apps, modify "$cfg [' Servers '] [$i] [' password '] = '", $cfg [' Servers '] [$i] [' password '] = ' password to be modified ';. Restart the service if you are on the way to change
forgot the password, can be re-modified as follows: ① in the file "My.ini" the "mysqlid" field at the bottom of the "skip-grant-tables", restart the MySQL service ② and then go to the MySQL console to re-modify the password in the same way as above the second change. ③ change the password after the "My.ini" added "Skip-grant-tables" deleted. ④ Restart Service
Wampserver #1045 Unable to log on to MySQL server