How to solve mysql error 10061

How to solve mysql error 10061

This article shares with you the solution to the problem "Can't connect to MySQL server on 'localhost' (10061)" for your reference. The specific content is as follows

Online search method 1:

Today I copied the MySQL database to another machine, but it failed to connect. It reported the error "Can't connect to MySQL server on 'localhost' (10061)". I searched online and found a very good article. Both methods can solve this problem.
1. Delete my.ini (under C:\windows\), re-run winmysqladmin, and after being asked to enter the username and password, the problem is solved!
2. Check if localhost in the hosts file points to 127.0.0.1

If the mysql service is not started, run net start mysql.
Some relevant commands:
mysqld-nt --install #Start MySQL
mysql #Run MySQL
mysql -h ipAddress -u username -p

Online search method 2:

Solution to mysql error 10061

If "ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)" appears,

This means your MySQL has not been started. Solution:

first step

Delete my.ini under c:\windowns

Step 2

Enter the BIN directory under DOS

C:\Program Files\MySQL\MySQL Server 5.4\bin

Step 3

Enter mysqld -nt -remove in DOS to delete the service

Then enter mysqld -nt -install to install the service

Step 4

Type net start mysql

mysql started successfully

--------------------------------------------------------------------------------------------------------

The above two methods did not solve my problem.

However, the above two methods have actually touched upon the point. That is, my MySQL has not been started. So how do you start it?

Enter the BIN directory under DOS

C:\Program Files\MySQL\MySQL Server 5.4\bin

Then, just enter net start mysql

Then just press enter.

The screenshots are as follows:

Or directly

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:
  • Steps for installing MySQL 8.0.16 on Windows and solutions to errors
  • Solution to MySQL error code 1862 your password has expired
  • MySql inserts data successfully but reports [Err] 1055 error solution
  • How to solve the abnormal error ERROR: 2002 in mysql
  • Solution to 1045 error when navicat connects to mysql
  • How to solve the error 1093-You can't specify target table for update in FROM clause in MySQL
  • Solution to the MySQL error "Every derived table must have its own alias"

<<:  Detailed explanation of how to build an Ftp server on Ubuntu (success guaranteed)

>>:  How to set up virtual directories and configure virtual paths in Tomcat 7.0

Recommend

Tips for turning pixels into comprehensive brand experiences

Editor: This article discusses the role that inte...

Discuss the value of Web standards from four aspects with a mind map

I have roughly listed some values ​​to stimulate ...

How to use MySQL common functions to process JSON

Official documentation: JSON Functions Name Descr...

JavaScript array reduce() method syntax and example analysis

Preface The reduce() method receives a function a...

GZIP compression Tomcat and improve web performance process diagram

1. Introduction I recently worked on a project an...

Three methods to modify the hostname of Centos7

Method 1: hostnamectl modification Step 1 Check t...

Docker nginx example method to deploy multiple projects

Prerequisites 1. Docker has been installed on the...

Three ways to communicate between Docker containers

We all know that Docker containers are isolated f...

Implementation of new issues of CSS3 selectors

Table of contents Basic Selector Extensions Attri...

Example of how to set automatic creation time and modification time in mysql

This article describes how to set the automatic c...

A brief discussion on whether CSS will block page rendering

Maybe everyone knows that js execution will block...

How to permanently change the host name in Linux

If you want to change your host name, you can fol...