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 Mysql connection error ERROR 2003

2025-02-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "how to solve Mysql connection error ERROR 2003". In daily operation, I believe many people have doubts about how to solve Mysql connection error ERROR 2003. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to solve Mysql connection error ERROR 2003". Next, please follow the editor to study!

Mysql connection error ERROR 2003 (HY000)

Environment:

OS:Windows Server 2012

DB:Mysql5.7

Scene:

Take over a new system, which has been running normally for some time, using tomcat, database mysql and no backup

Question:

The implementation staff can no longer find it, and the database password and other information has not been handed over, but the mysql database password can be found quickly in the tomcat configuration file.

However, when trying to log in to the mysql database locally with root users, an error is reported:

"ERROR 2003 (HY000): can't connect to MYSQL server on 'localhost' (10061)"

Problem analysis:

The possible reasons for the mistake are:

(1) the Mysql service is not started

The system has been running normally for some time, and the database must be started normally, which can be ruled out.

(2) Database port is not the default port

Carefully check the tomcat configuration file and find that the port is not the default port 3306. When connecting to mysql, you need to manually specify the port through the "P" parameter, then you can connect to the database normally.

For example:

Mysql.exe-uroot-P12345-pawns *

At this point, the study on "how to solve Mysql connection error ERROR 2003" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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