Home  >  Article  >  Database  >  Detailed explanation of the solution to the 1045 error when navicat connects to mysql

Detailed explanation of the solution to the 1045 error when navicat connects to mysql

黄舟
黄舟Original
2017-03-29 13:54:493489browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn