Solution for mysql error 10061, mysql10061

Source: Internet
Author: User

Solution for mysql error 10061, mysql10061

This article will share with you the solutions for mysql's appearance of Can't connect to MySQL server on 'localhost' (10061) for your reference. The specific content is as follows:

Method 1:

I copied the mysql database to another machine today and the result could not be connected. The error "Can't connect to MySQL server on 'localhost' (10061)" is reported.
Search online and find that an article is good. Both methods can solve this problem.
1. delete my. ini (under C: \ windows \) and run winmysqladmin again. After Entering the user name and password, the problem is solved!
2. Check whether the localhost In the hosts file points to 127.0.0.1.

If the mysql service is not started, you can run net start mysql.
Some related commands:
Mysqld-nt -- install # Start Mysql
Mysql # Run Mysql
Mysql-h ipAddress-u username-p

Method 2:

Solution to mysql 10061 Error

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

It indicates that your MySQL instance has not been started yet. Solution:

Step 1

Delete my. ini under c: \ windowns

Step 2

Enter the BIN directory under DOS

C: \ Program Files \ MySQL Server 5.4 \ bin

Step 3

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

Enter mysqld-nt-install to install the service.

Step 4

Enter net start mysql

Mysql started successfully

Bytes --------------------------------------------------------------------------------------------------------

The above two methods cannot solve my problem.

However, the above two methods have already been highlighted. That is, my MySQL has not been started yet. So how can we start it.

Enter the BIN directory under DOS

C: \ Program Files \ MySQL Server 5.4 \ bin

Then, directly enter net start mysql

Then enter.

As follows:

Or directly

The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.