Home  >  Article  >  Database  >  What should I do if navicat connection error 1045 is reported?

What should I do if navicat connection error 1045 is reported?

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-06 09:49:2935273browse

What should I do if navicat connection error 1045 is reported?

navicat for MySQL has a 1045 error when connecting to the local database, as shown below:

What should I do if navicat connection error 1045 is reported?

Indicates that the database password is incorrect when connecting to mysql and needs to be modified. The problem can be solved only after entering the password.

Related recommendations: "Navicat for mysql graphic tutorial"

The solution steps are as follows:

What should I do if navicat connection error 1045 is reported?

1 , First open the command line: Start->Run->cmd;
2. First enter the bin directory of mysql installed on the computer (the installation path of your own software). If it is the C drive, you can directly execute the command : mysql -u root mysql;

3. After entering mysql, execute the command: UPDATE user SET Password=PASSWORD('newpassword') where USER='root';

4. If 1820 is reported If there is an error, execute the command: ALTER USER USER() IDENTIFIED BY 'New Password', it will prompt Query OK, indicating that the password has been modified successfully;

5. If a 1054 error is reported as shown in the figure below, then change the command The statement is: update user set authentication_string=password('root') where user='root'; that's it.

Because there is no password field in the mysql database, the password field is changed to authentication_string.

What should I do if navicat connection error 1045 is reported?

#6. After completion, execute the command: quit or exit to exit mysql.

ps: If a 1064 error is reported during the execution of the command, it may be a syntax error. Pay attention to check whether there are any errors in your sql statement.

The above is the detailed content of What should I do if navicat connection error 1045 is reported?. 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