MySQl uses ------- how to change the root password & amp; to solve the problem of local login failure

Source: Internet
Author: User

MySQl uses ------- how to change the root password & amp; To solve the local login failure problem

Environment: windows

Version: mysql56

Reference: www.jb51.net/article/15292.htm http://zhidao.baidu.com/link? Url = Response

Operation:

----------------------------------------------------------------------- Change the password ----------------------------------------------------------------------------------------------------

1. net stop mysql stop service/to the task manager close problem: the system prompts that the service name cannot be found. Enter the actual service name of the Service Management corresponding to net stop mysql56.

2. Run mysqld -- skip-grant-tables in the bin directory without authorization. The mysqld-nt -- skip-grant-tables command in the document is unavailable.

3. Open a new cmd window and run the following command: the user name and password are reversed on the Internet.
Mysql-uroot
Update mysql. user set password = password ('new password') where user = 'user like root ';

If the correct message is displayed, the row number is successfully modified.

4. Open the task manager, stop the mysql and mysqld processes, and start the mysqld service using net start mysql. Then, you can use the root password of the root user to enter the database.

--------------------------------------------------------------- Connect to the local device ------------------------------------------------------------------------

After modification, you still cannot configure local logon in workbanch. This password should be correct.

Solution:

1. If the net start mysql56 test result cannot be started, you cannot start it manually by opening the management tools-> services-> mysql56.

2. register the service again (here I will change mysqld-nt to mysqld)

Step 1:

Mysqld-nt remove mysqlservice

To uninstall the service, it prompts that the uninstall is successful,

Step 2:

Mysqld-nt install mysqlservice

Register the service again, and everything will return to normal.

Step 3: Open the service >>> disable MYSQL >>> start MYSQL again

There is another method (the local login method I use here)

"My Computer"-> right-click-> "service"-> Find mysql service-> right-click "properties"-> select "login" tab

Enter the account name or browse user name, select the user name, enter the password and confirm the password, and click "OK"

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.