How to modify the default empty mysql password in WAMP _ MySQL

Source: Internet
Author: User
Tags mysql tutorial
How to modify the default mysql null password in WAMP

After WAMP is installed, the mysql tutorial password is blank. how can I modify it? In fact, it is very simple. just run a few commands. next I will perform the operations step by step.

First, open the mysql console through WAMP.

Prompt to enter the password. because it is empty, press enter.

Enter "use mysql", which means to use the mysql Database tutorial 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 using the php Tutorial myadmin to directly modify the password in the mysql table should be correct in principle, but I found that the entire mysql database is missing after the modification, I re-installed the WAMP, and finally modified it through the command line.

As you can find out, the operation is not difficult, because I found that mysql on my colleagues' computers are all empty passwords. in the future, if I had to configure a server, I would not be able to get a blank password.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.