Navicat for MySQL connection error, error code 1045 Solution
Navicat for MySQL
Solution: reset the root user password.
Method 1:
Open "start" -- "program" -- "MySQL" -- "MySQL 5.0" -- "MySQL Server Instance Config Wizard" and click "Next ".
Current root password: Enter the original password
New root password: Enter the New password
Confirm: Enter the new password again.
Next, you can proceed all the way... until it is successful!
Error 1045 is essentially a password issue! If you use a blank password for the first login, you can leave it empty.
Method 2:
1. log on to the system as a system administrator;
2. If the MySQL server is running, stop it.
If the server runs as a Windows Service, go to Service Manager: Start Menu-> Control Panel-> Administrative Tools-> services
If the server is not running as a service, you may need to use the task manager to force it to stop.
3. Create a text file and place the following commands in a single line:
Set password for 'root' @ 'localhost' = PASSWORD ('mynewpassword ');
Save the file with any name. In this example, the file is C: \ mysql-init.txt.
4. Enter the doscommand prompt: Start Menu-> Run-> cmd
Assume that you have installed MySQL to C: \ mysql. If you install MySQL in another location, adjust the following commands.
Run the following command at the doscommand prompt:
C: \> C: \ mysql \ bin \ mysqld-nt -- init-file = C: \ mysql-init.txt
When the server is started, run the "-- init-file" option (function: Read SQL commands from the specified file at startup) to change the root user password. When the server is successfully started, delete the C: \ mysql-init.txt.
5. Stop the MySQL server and restart it in normal mode. If you run the server as a service, you should start it from the Windows service window. If the server is started manually, the command can be used as usual.
This article permanently updates the link address: