Problem description: An error is reported when using navicat to connect to the local database, but the connection to the remote server is normal.
Related recommendations: "Navicat for mysql graphic tutorial"
Method one:
1. Close the running MySQL service.
2. Open the DOS window and go to the mysql\bin directory.
3. Enter mysqld –skip-grant-tables and press Enter. –skip-grant-tables means to skip the permission table authentication when starting the MySQL service
4. Open another DOS window (because the DOS window just now cannot be moved), go to the mysql\bin directory .
5. Enter mysql and press Enter. If successful, the MySQL prompt > will appear.
6. Connect to the permission database: use mysql;.
6. Change password: update user set authentication_string=password(“123”) where user=”root”; (don’t forget to add the semicolon at the end).
7. Refresh privileges (required step): flush privileges;.
8. Quit.
Result: The mysql service cannot be started normally, and there is still an 1862 error, which is a big deal.
Method 2:
Go to the bin directory of mysql in the command prompt and run this line: mysqladmin –u username –p old password password new password
Result: Although there is a warning and it does not look like success, the new connection password "123" can indeed be connected.
The above is the detailed content of What to do if 1862 error occurs in navicat. For more information, please follow other related articles on the PHP Chinese website!