This article mainly introduces in detail the solution to the 1045 error when navicat connects to mysql. It has certain reference value. Interested friends can refer to it
navicat for MySQL connectionLocal databaseA 1045 error appears as shown below:
I checked a lot of information, which means that mysql does not authorize remote connections, that is, permissions Not enough;
Solution:
1. First open the command line: Start->Run->cmd.
2. First enter the computer and install in the bin directory of mysql. Because I am using phpstudy, mysql is installed on the D drive. If yours is the C drive, there is no need to execute it. The first command
D: cd D:\phpStudy\MySQL\bin mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD('newpassword') where USER='root'; mysql> FLUSH PRIVILEGES; mysql> quit
Execute the above command and try again. Do you still get this error?
The above is the detailed content of Detailed explanation of the solution to the 1045 error when navicat connects to mysql. For more information, please follow other related articles on the PHP Chinese website!