1, after the installation of Wamp, run Wampserver program, into the MySQL console;
2, enter the console, prompt for password (do not enter any password, because the password is empty), press ENTER enter;
3. Enter "use MySQL;" Then enter, meaning to select MySQL database;
4. Enter "Update user set Password=password (' Here is the password, such as: Root ') where user= ' root '; then enter; return information:
Query OK, 0 rows Affected (0.00 sec)
Rows matched:2 changed:0 warnings:0
5, input quit quit the console;
6, restart the MySQL service;
7, enter the user name, you set the password, login success.
So MySQL login and password is no problem, but use phpMyAdmin login, reminder password is invalid, this because we have a step to complete
This only modifies the MySQL password, if you visit phpMyAdmin, you will be prompted for permissions issues. 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 go through the command mode, here is 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
The code is as follows |
|
Update user set Password=password (' NewPassword ') where user= ' root ';//note the following semicolon |
Wamp Change the login password of the MySQL root user