1, the installation of good Wamp, run the Wampserver program, into the MySQL console;
2, enter the console, prompted to enter the password (do not enter any password, because the password is empty), press ENTER enter;
3, input "use MySQL;" Then enter, meaning to choose the MySQL database;
4, input "Update user set Password=password (' Here is the password, such as: Root ') where user= ' root ';" Then enter the return message:
Query OK, 0 rows Affected (0.00 sec)
Rows matched:2 changed:0 warnings:0
5, Input quit exit the console;
6, restart the MySQL service;
7, enter the user name, you set the password, login successfully.
This MySQL login and password is no problem, but the use of phpMyAdmin login, the reminder password is invalid, because we still have a step this completes
This is only to modify the MySQL password, if access to phpMyAdmin, will prompt you permission issues and so on. Find the phpMyAdmin installation directory, usually in wamp/apps/phpmyadmin/this location, open config.inc.php, edit the following lines:
The code is as follows |
|
$cfg [' Servers '] [$i] [' auth_type '] = ' http ';//Modified by Config to HTTP $cfg [' Servers '] [$i] [' user '] = ' root '; $cfg [' Servers '] [$i] [' password '] = ' newpassword '; $cfg [' Servers '] [$i] [' allownopassword '] = false; |
All right, it's done.
Of course we can also in the command mode, here a brief introduction.
Open the Wamp MySQL console so you can go to the MySQL command line interface. Input
The code is as follows |
|
Use MySQL; |
Normal will prompt you database changed
then enter
code is as follows |
&nbs P; |
Update user set Password=password (' NewPassword ') where user= ' root ' ;//Note the following semicolon |