Modify the MySQL password in Windows

Source: Internet
Author: User

We often forget the mysql password and may need to modify it.

Record the test results of how Baidu modified the mysql password:

1. Add a line after the configuration file mysql. ini:

Skip-grant-tables
Indicates skipping the authorization table.



2. Restart the mysql service. <Strong? Http: www.bkjia.com kf ware vc "target =" _ blank "class =" keylink "> Vc3ryb25np1_vade + watermark + bmV0IHN0YXJ0IG15c3Fsu9iztTwvcD4KPHA + pgltzybzcm9 "http://www.bkjia.com/uploadfile/Collfiles/20131220/201312200904515.png" alt = "\">

In this way, you can directly log on to mysql without a password.

3. Change the password.

Use mysql; update user set password = PASSWORD ("root") where user = 'root ';


Exit.

4. Delete the line added in mysql. ini. 5. Restart the mysql service.

In this way, you can log on to mysql with a new 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: info-contact@alibabacloud.com 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.