Reset the root password for MySQL

Source: Internet
Author: User

    1. Add skip-grant-tables (only add it) to the My.ini segment [mysqld]650) this.width=650; "src="/HTTP// S3.51cto.com/wyfs02/m00/2d/16/wkiom1oth72c6ewoaaa3oikzlqu262.jpg "title=" 12}mzj0$fmzo1[' W@ ' D0 ' NR.jpg ' alt= ' Wkiom1oth72c6ewoaaa3oikzlqu262.jpg "/>

2. Restart the MySQL service

3. Open cmd, turn to mysql installation path C:\Program files\mysql\mysql Server 5.1\bin650) this.width=650; "src = "Http://s3.51cto.com/wyfs02/M02/2D/16/wKioL1OTH7LS0ss7AABH9ViM6SE792.jpg" title= "R0o_h0klcwi]_{wbgt94nt2.jpg" alt= "Wkiol1oth7ls0ss7aabh9vim6se792.jpg"/>

4. Enter mysql-uroot-p

5. password input empty, this will automatically turn to SQL input mode 650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M02/2D/16/ Wkiom1oth6nj2ar5aadnziehcju961.jpg "title=") s5kcior3r ' ~foae) 9[@2.jpg "alt=" Wkiom1oth6nj2ar5aadnziehcju961.jpg " />

6. Enter use MySQL

7. Enter update user set Password=password (' new password ') where user= ' root ' 650) this.width=650; "src=" http:// S3.51cto.com/wyfs02/m00/2d/16/wkiom1otianswnqfaadcz0jc6u8691.jpg "title=" o{0 (li94w$acd2$u3cvdcgh.jpg "alt=" Wkiom1otianswnqfaadcz0jc6u8691.jpg "/>

8. Complete

9. Remove The newly added configuration in the My.ini, restart MySQL, you can


Want to cry heart all have, already on-line project database suddenly connect not on, the customer calls to ask the situation, make of my confused, no one changed password, fortunately solved. Reset the password on it, hoping to help people with similar problems.





Related Article

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.