MySQL password change instance details, mysql password change details

Source: Internet
Author: User

MySQL password change instance details, mysql password change details

MySQL password change instance details

I haven't used MySQL for a long time. Today, when I opened HediSQL to connect to mysql, I found that the root password was forgotten. I tried to change the password for a while and recorded it for later use. (Win10 Local Operation)

Close MySQL service: net stop MySQL opens the cmd Console window as an administrator and enters the bin directory of the MySQL directory, execute mysqld -- skip-grant-tables and open another cmd window to directly execute the mysql Command (because operation 2 can access the table without authorization, you can directly use mysql, log on without the username and password.) switch to the mysql database: uses mysql. Modify the password field of the user table: update user set password = password ('000000') where user = 'root '; execute the refresh operation: flush privileges; exit mysql: quit; restart MySQL service: net start MySQL

Step 2. Start the MySQL server

Step 3-7: Change the User Password

Thank you for reading this article. I hope it will help you. Thank you for your support for this site!

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.