mysql5.7 Set Password under Windows

Source: Internet
Author: User

Learn springboot when using the MySQL database, the previous version of the mysql5.6 basic Baidu A tutorial can be, I heard that 5.7 have new changes, suddenly want to try to find the decompression version mysql5.7 as usual installation,

Previously used mysql5.6 version of basic Baidu A tutorial can, heard that 5.7 have new changes, suddenly want to try to find the decompression version of MySQL

Root login, change the password, the problem is, change the password restart service input password will show Access denied for user root @localhost
The password did not change successfully so in Baidu some posts, the main steps are as follows

It's a good idea to run cmd as Administrator
Go to the Bin directory, and then stop the server, enter the net stop MySQL
Re-enter Mysqld--skip-grant-tables (enter, start MySQL, meaning to tell MySQL does not require login verification).
Then turn off cmd and turn it back on.
Input mysql-uroot-p continuous Press two times the Enter button will go directly to the MySQL console interface, at this time found that the login root account does not require a password.

Enter Update Mysql.user set Authentication_string=password (' 123 ') where user= ' root '; Assuming the password is 123.
Finally enter flush privileges; Press ENTER to tell MySQL to refresh the system permissions, at which time the changed password will take effect.
Now that the password has changed, restart the MySQL service
Display can not start, is here stuck, thought did not install well, start every time change password can not start the service, so back and forth began to doubt life,
I'm not going to believe it. Then delete the service, the registry, delete all the MySQL directory, the prompt process is in use, suddenly a think I clearly service can not start,
Could it be the one that skipped the authentication login process, the Task Manager did find the Mysqld.exe process,
So again after modifying the password to kill the Mysqld.exe process, and then restart the MySQL service, everything is normal.

Modify the password to turn off the Mysqld.exe process, and then start MySQL normally.

mysql5.7 Set Password under Windows

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.