Solve MySQL startup error: ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

Solve MySQL startup error: ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

This error is often encountered by novices. This article mainly introduces how to fix ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
Solution:
1. Log in to the host where MySQL is installed, open the cmd command line tool, execute the command mysql -uroot -p, and the error described below will be reported;

insert image description here

2. Find Computer Management in the Start menu, find [Services] in Computer Management, and check whether there is a MySQL service in the service;

insert image description here

insert image description here

3. If the MySQL service cannot be found in [Step 2], you need to manually install the MySQL service. The installation command is mysqld -install. Since the MySQL service has been installed on this machine, the following prompt will appear: The service already exists!

insert image description here

4. If the Mysql service can be found in [Step 2], double-click the service to view the current status of the service. If it is not running, click [Start] to run the service;

insert image description here

5. In addition, you can also start the Mysql service by executing the command net start mysql in cmd;

insert image description here

6. After the Mysql service is successfully started, execute the command in [Step 1] again to connect to the Mysql database normally.

insert image description here

This is the end of this article about solving the MySQL startup error: ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061). For more information about MySQL error: ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061), please search 123WORDPRESS.COM's previous articles or continue browsing the following related articles. I hope you will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • MySQL bypasses granting information_schema objects and reports ERROR 1044 (4200) error
  • mysql databasemysql: [ERROR] unknown option ''--skip-grant-tables''
  • How to solve the 10060 unknow error when Navicat remotely connects to MySQL
  • Ubuntu 18.0.4 installs mysql and solves ERROR 1698 (28000): Access denied for user ''''root''''@''''localhost'''
  • ERROR 2002 (HY000): Can't connect to local MySQL server through socket ''/tmp/mysql.sock''
  • Solution to MySQL server login error ERROR 1820 (HY000)

<<:  Detailed explanation of jQuery's copy object

>>:  Troubleshooting the cause of 502 bad gateway error on nginx server

Recommend

Use nginx to dynamically convert image sizes to generate thumbnails

The Nginx ngx_http_image_filter_module module (ng...

What to do if the auto-increment primary key in MySQL is used up

In the interview, you should have experienced the...

Detailed Example of Row-Level Locking in MySQL

Preface Locks are synchronization mechanisms used...

Two methods of implementing automatic paging in Vue page printing

This article example shares the specific code of ...

A brief discussion on the issue of element dragging and sorting in table

Recently, when using element table, I often encou...

Nginx cache files and dynamic files automatic balancing configuration script

nginx Nginx (engine x) is a high-performance HTTP...

Detailed explanation of COLLATION examples in MySQL that you may have overlooked

Preface The string types of MySQL database are CH...

How to implement nested if method in nginx

Nginx does not support nested if statements, nor ...

Detailed tutorial for installing influxdb in docker (performance test)

1. Prerequisites 1. The project has been deployed...

Solve nginx "504 Gateway Time-out" error

Students who make websites often find that some n...

Introduction to MySQL database performance optimization

Table of contents Why optimize? ? Where to start?...

How to set up a deployment project under Linux system

1. Modify the firewall settings and open the corr...