Error description
1045 Access denied for user ' root ' @ ' localhost ' using password Yes
1045 Access denied for user ' root ' @ ' localhost ' using password no
Solutions
1. start-up cmd-to-net stop MySQL (disable MySQL service does not start can be omitted)
2. Locate the installation path under MySQL Server 5.1 My.ini
3. Open My.ini to find [mysqld] and add the following
This sentence: Skip_grant_tables (meaning as if the MySQL service is starting to skip permission table authentication)
4. Then start the database and change the password.
Start-up, cmd-to-net start MySQL (start MySQL service)---> mysql enter (MySQL prompt will appear if successful)
5. Enter use MySQL; (Connection rights database).
6. Change Password: Update user set Password=password ("123") where user= "root"; ( don't forget the last semicolon ).
7. Refresh permissions (required steps): flush privileges;.
8. Quit quit.
9. Remove the skip_grant_tables from the My.ini in the 3rd step (do not let him skip the authorization form when starting the MySQL service)
10. Restart MySQL, then enter, use the user name root and the new password just set 123 can log in.
CMD error occurred
When we open cmd, input net stop MySQL has a system error 5 o'clock, which is not running as an administrator while running CMD. In the program-start and search-cmd mouse right-click on a run as administrator.
If you use the cmd command frequently, you can lock it to the menu bar.
Every time you have to right-click to run as Administrator is also troublesome, set a step can be directly as administrator.
In C:\Windows\System32 (the operating system is divided into 32-bit and 64-bit, depending on the individual case selection), locate Cmd.exe, and then right-click Cmd.exe
Select advanced in the lower right corner and tick before "Run as Administrator"
Re-open cmd just fine.
Re-modify password when MySQL forgot password