Solution to 1045 error when navicat connects to mysql

Solution to 1045 error when navicat connects to mysql

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

After checking a lot of information, it means that MySQL does not authorize remote connection, that is, the permissions are insufficient;

Solution:

1. First open the command line: Start->Run->cmd.
2. First enter the bin directory of mysql installed on the computer. Because I use phpstudy, mysql is installed in the D drive. If yours is the C drive, you don’t need to execute 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 

After executing the above command, try again and see if this error still occurs!

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Solve the problem of Navicat for MySQL reporting 2005 error when connecting to MySQL
  • Common errors and solutions for connecting Navicat to virtual machine MySQL
  • Navicat connects to MySQL8.0.11 and an error 2059 occurs
  • When Navicat connects to MySQL, it reports 10060, 1045 errors and the location of my.ini
  • Solve the 1251 error when establishing a connection between mysql and navicat
  • Solution to 2059 error when connecting Navicat to MySQL
  • Navicat connection MySQL error description analysis

<<:  The role of nextTick in Vue and several simple usage scenarios

>>:  Linux file systems explained: ext4 and beyond

Recommend

favico.ico---Website ico icon setting steps

1. Download the successfully generated icon file, ...

Create a movable stack widget function using flutter

This post focuses on a super secret Flutter proje...

Summary of methods to check whether the port is open in Linux

Method 1: Use lsof command We can use the lsof co...

Detailed explanation of webpack-dev-server core concepts and cases

webpack-dev-server core concepts Webpack's Co...

MySQL 8.0.16 installation and configuration tutorial under CentOS7

Uninstall the old version of MySQL (skip this ste...

How to run tomcat source code in maven mode

Preface Recently, I was analyzing the startup pro...

Detailed explanation of generic cases in TypeScript

Definition of Generics // Requirement 1: Generics...

Detailed tutorial on installing MySQL offline on CentOS7

1. Delete the original mariadb, otherwise mysql c...

js to implement add and delete table operations

This article example shares the specific code of ...

IDEA configuration process of Docker

IDEA is the most commonly used development tool f...

Solution to mysql error code 1064

If the words in the sql statement conflict with t...

Mysql8.0 uses window functions to solve sorting problems

Introduction to MySQL Window Functions MySQL has ...