Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of navicat failed to connect to mysql

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to solve the problem of navicat failed to connect to mysql. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

When Navicat connects to the mysql database, it keeps reporting 1405 errors. Here is the solution to this:

The MySQL server is running. Stop it. If it is a server running as a Windows service, go to computer Management-> Services and applications-- > Services. If the server is not running as a service, you may need to use Task Manager to force it to stop.

Create a text file (named mysql-init.txt here) and put the following command on a single line: SET PASSWORD FOR 'root'@'localhost' = PASSWORD (' MyNewPassword')

(note to import the file we created into the bin directory under the MySql installation directory D:\ progame\ bin) progame is my own MySql directory, be careful not to mislead [it is the sql under your own installation directory]

When the server starts, the contents of the file named by the "--init-file" option (function: read the SQL command from the specified file at startup) are executed, and the root password is changed. When the server starts successfully, we should delete the mysql-init.txt file we imported.

Finally, stop the MySQL server and restart it. [note that the server runs automatically and should be started from the Windows services window. If you start the server manually, you can use commands as you would normally do. ] and then found that the database is connected.

Thank you for reading! On how to solve the problem of navicat connection mysql failure to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report