From: http://wenku.baidu.com/link?url=J4K28e1kt-_ Ykjlsots1b5t6hkj5izl5hxskiib133avpcuxllxgkscsbsxi0ma-mpal3dndmqz-uw9ahqig1kqlekdzmuwo0xy9ozutnd7
Set the password password for MySQL in Wamp
Wamp after the installation, MySQL password is empty, then how to modify it? Actually very simple, through a few instructions on the line, below I step by step to operate.
1. First, open the MySQL console via Wamp. Prompt for password, because it is now empty, so press ENTER directly.
2. Then enter "use MySQL", meaning "database changed" is used to indicate MySQL.
3. Then enter the SQL statement for the password to be modified "update user set Password=password (' New password ')
where user= ' root '; Note that the semicolon at the end of the SQL statement is not small, so it is ok to prompt for anything.
4. Finally enter "flush privileges;", do not enter this, the operation of the password change will not be effective. Enter "Quit" to exit.
Settings for the phpMyAdmin
After modifying the password for MySQL, the phpMyAdmin is also briefly configured to use phpMyAdmin to access MySQL normally. Locate the config.inc.php file under wamp\apps\phpmyadminx.x.x, where two lines of code are: $cfg [' Servers '] [$i] [' user '] = ' root '; $cfg [' Servers '] [$i] [' password '] = ";
The password value is empty. And then according to other commands such as above to set the MySQL initial password, only to modify the MySQL password, do not forget that the amp is three programs, so that masql to enter the password to enter, and open phpMyAdmin when the two errors appear:
"#1045 –access denied for user ' root ' @ ' localhost ' (using password:
NO) "" PhpMyAdmin tries to connect to the MySQL server, but the server rejects the connection. You should check the host, user name, and password in the configuration file and confirm that the information is consistent with the information given by the MySQL server administrator. ”
Cookie is a curse because you set a cookie in the code in the config.inc.php file under wamp\apps\phpmyadminx.x.x:
$cfg [' Servers '] [$i] [' auth_type '] = ' cookie '; Workaround: Open the ie-tool-delete the cookie. Finally restart the Wamp all server is ready!
Wamp mysql setup password (default password is empty) and phpMyAdmin configuration