Home  >  Article  >  Database  >  How to solve error 1045 when navicat connects to mysql

How to solve error 1045 when navicat connects to mysql

爱喝马黛茶的安东尼
爱喝马黛茶的安东尼Original
2019-08-17 14:04:5533034browse

How to solve error 1045 when navicat connects to mysql

#How to solve the 1045 error when Navicat connects to mysql?

1045 appears when using Navicat to connect to mysql. The possible reason is that the password has been forgotten.

How to solve error 1045 when navicat connects to mysql

The following methods can help reset the password:

1. Run the cmd program with administrator rights;

2. cd C: \Program Files (x86)\MySQL\MySQL Server 5.7\bin

3. Close the mysqld process,

>>tasklist |findstr mysqld This line of command can be used to check whether mysqld is in Run, you can check its PID during operation

>>taskkill /F /PID xxxx

Related recommendations: "

Navicat for mysql graphic tutorialHow to solve error 1045 when navicat connects to mysql"

4. Skip permissions to log in to the MySQL server>>mysqld --skip -grant-tables

Close cmd, re-run cmd with administrator rights

5, change password

>>cd C:\Program Files (x86)\ MySQL\MySQL Server 5.7\bin

>>mysql

>>update mysql.user set authentication_string=password('123456') where user = 'root';

How to solve error 1045 when navicat connects to mysql>>flush privileges;

>>SELECT * from mysql.user\G;

How to solve error 1045 when navicat connects to mysqlFind the authentication_string item of the root user and write down its value

##>>update mysql.user set authentication_string = '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' where user = 'root';here user = 'root';

>>flush privileges;How to solve error 1045 when navicat connects to mysql

>>quit

##6. Restart mysql

>>net start mysql

How to solve error 1045 when navicat connects to mysql

7. Try to connect. If 1862 is prompted, change the password and connect again.

>>mysqladmin -uroot -p password

How to solve error 1045 when navicat connects to mysql

##Test the connection again,

How to solve error 1045 when navicat connects to mysql You're done!

The above is the detailed content of How to solve error 1045 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