InstallWAMPWhen,MySQLBy default, the password isEmpty PasswordThis is not conducive to the security of the server. We often change it to a password with high security. The modification method is actually very simple. Just run a few commands. Next I will perform the operation step by step.
First, open the mysql console through WAMP.
Prompt to enter the password. Because it is empty, press Enter.
Then, enter "use mysql", which means to use the mysql Database and prompt "Database changed.
Then enter the SQL statement "update user set password = PASSWORD ('hooray') where user = 'root';" for the password to be modified. Note that there must be no fewer semicolons at the end of the SQL statement, the prompt is OK.
Finally, enter "flush privileges;". If you do not enter this parameter, the password change operation will not take effect.
Enter "quit" to exit.
In addition, many people say that you can directly modify the password in the mysql table through phpmyadmin. The principle should be correct, but I found that the entire mysql database was lost after the modification, which caused me to reinstall WAMP, finally, it was modified through the command line.
For personal computers, you may think that modification is not important, but if it is a server, you still need to change the empty password, because it may be unsafe.
Here, we will introduce how to modify the MySQL Empty Password in WAMP. If you want to learn more about MySQL databases, the article here is just as brilliant: http://database.51cto.com/mysql /.