MySQL appears can ' t connect to the MySQL server on ' localhost ' (10061) problem

Source: Internet
Author: User
Tags mysql database
Today, the MySQL database copy to another computer, the result is not even, reported "Can" T connect to the MySQL server on ' localhost ' (10061) "error.
To search online, found an article is very good, both methods can solve this problem
Online Search Method One:
1, delete My.ini (under c:/windows/), rerun Winmysqladmin, request to enter user name and password, solve problem!
2, look at the Hosts file localhost is not pointing 127.0.0.1
If the MySQL service is not started, you can run net start MySQL.
Some related commands:
The code is as follows Copy Code
Mysqld-nt–install #启动Mysql
MySQL #运行Mysql
Mysql-h Ipaddress-u Username-p
Online Search Method Two:
MySQL 10061 Error resolution
If "Error 2003:can ' t connect to MySQL server ' localhost ' (10061)" appears,
Shows that your MySQL has not yet started. Solution:
First step
Delete the My.ini under C:/windowns
Second Step
Enter the bin directory under DOS
C:/Program Files/mysql/mysql Server 5.4/bin
Third Step
The code is as follows Copy Code
Enter Mysqld-nt-remove Delete Service in DOS
Then enter the Mysqld-nt-install installation service
Fourth Step
The code is as follows Copy Code
Enter net start MySQL
MySQL started successfully
Neither of these methods can solve my problem.
But, in fact, the above two methods have already said the point.
That is, my MySQL does not start. So how do we get it started.
Enter the bin directory under DOS
The code is as follows Copy Code
C:/Program Files/mysql/mysql Server 5.4/bin
Then, enter net start MySQL directly
And then enter on it.
Screenshot below:
or directly:

Related Article

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.