How to solve the problem of ERROR 2003 (HY000) when starting mysql

How to solve the problem of ERROR 2003 (HY000) when starting mysql

1. Problem Description

When starting MYSQL, a problem occurs: "ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)", as shown in the figure:

2. Problem Analysis

From the error message, we can see that the MySQL service is not started, so we just need to start the MySQL service.

3. Problem Solving

You can start the MySQL service directly using net start MySQL , but an error still occurs after entering the command:

You can see the error message: "Invalid service name", which means that the MySQL service does not exist, but it is confirmed that MySQL has been installed, so open Computer Management and find the Service tab, where you can find the MySQL service, as shown in the figure:

I found that the service name of the MySQL service on my computer is "MySQL57". In fact, you can directly click to start this service to solve the problem, and you can enter the properties and change the startup type to automatic. However, I plan to continue to use the CMD command to start it. At this time, enter net start MySQL57 , and the result is as shown in the figure:

Another error occurred, and the error message was "System error 5. Access denied." After searching for information, I found that the reason for this problem was that CMD was not run as an administrator, so I restarted CMD as an administrator and entered net start MySQL57 again. The result is as shown in the figure:

The service was started successfully and the problem was solved.

4. Other questions

Why is my MySQL service named MySQL57? This is because I installed MySQL 5.7, and during the custom installation process the default service name was MySQL 57.

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:
  • MySQL error ERROR 2002 (HY000): Can't connect to local MySQL server through socket
  • mysql error:#1062 Duplicate entry '***′ for key 1 problem solution
  • MYSQL ERROR 1045 (28000): Access denied for user (using password: YES) solution
  • mysql ERROR 1044 (42000): Access denied for user ''''@''localhost'' to database
  • MySQLdb ImportError: libmysqlclient.so.18 solution
  • MySQL login error prompt: Solution to ERROR 1045 (28000)
  • UCenter info: MySQL Query Error SQL:SELECT value FROM [Table]vars WHERE noteexists
  • Multiple solutions to mysql error 2013 when it cannot be started
  • mysql error handling ERROR 1786 (HY000)
  • How to solve Error 1045 access denied when installing MYSQL on winxp

<<:  How to enable Flash in Windows Server 2016

>>:  Detailed explanation of LVM seamless disk horizontal expansion based on Linux

Recommend

Solve the problem that vue project cannot carry cookies when started locally

Solve the problem that the vue project can be pac...

Vue imports Echarts to realize line scatter chart

This article shares the specific code of Vue impo...

960 Grid System Basic Principles and Usage

Of course, there are many people who hold the oppo...

Detailed explanation of the initialization mechanism in bash

Bash Initialization Files Interactive login shell...

A brief discussion on the implementation principle of Webpack4 plugins

Table of contents Preface know Practice makes per...

Summary of the advantages of Vue3 vs. Vue2

Table of contents 1. Why do we need vue3? 2. Adva...

Vue implements file upload and download

This article example shares the specific code of ...

Example of javascript bubble sort

Table of contents 1. What is Bubble Sort 2. Give ...

MySQL slow query and query reconstruction method record

Preface What is a slow query and how to optimize ...

Implementation of mysql decimal data type conversion

Recently, I encountered a database with the follo...

Detailed explanation of how to use $props, $attrs and $listeners in Vue

Table of contents background 1. Document Descript...

Solution to the root password login problem in MySQL 5.7

After I found that the previous article solved th...

mysql splits a row of data into multiple rows based on commas

Table of contents Separation effect Command line ...

Pure CSS header fixed implementation code

There are two main reasons why it is difficult to...