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

Implementation of MySQL5.7 mysqldump backup and recovery

MySQL backup Cold backup:停止服務進行備份,即停止數據庫的寫入Hot ba...

In-depth understanding of the implementation principle of require loader

Preface We often say that node is not a new progr...

A brief discussion on MySQL index optimization analysis

Why are the SQL queries you write slow? Why do th...

HTTP and HTTP Collaboration Web Server Access Flow Diagram

A web server can build multiple web sites with in...

Thoughts on truncation of multi-line text with a "show more" button

I just happened to encounter this small requireme...

VMware Workstation 14 Pro installation and activation graphic tutorial

This article shares the installation and activati...

Reasons why MySQL queries are slow

Table of contents 1. Where is the slowness? 2. Ha...

Detailed installation and use tutorial of mysql 8.0.15 under windows

This article shares with you the detailed install...

Vue3.0+vite2 implements dynamic asynchronous component lazy loading

Table of contents Create a Vite project Creating ...

Using js to implement a number guessing game

Last week, the teacher gave me a small homework, ...

How to install MySQL 5.7.29 with one click using shell script

This article refers to the work of 51CTO blog aut...

How to execute PHP scheduled tasks in CentOS7

Preface This article mainly introduces the releva...

How to use the EXPLAIN command in SQL

In daily work, we sometimes run slow queries to r...

Summary of 3 minor errors encountered during MySQL 8.0 installation

Preface In the past, the company used the 5.7 ser...

MySQL installation and configuration tutorial for Mac

This article shares the MySQL installation tutori...