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"