Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't connect to MySQL server on 'localhost' (10061)

I recently installed MySQL 5 on Windows 2003 and tried configuring an instance. Everything worked fine until I got to "Applying Security settings", at which point it gave me the above error (Can't connect to MySQL server on 'localhost' (10061)).

I do have a port 3306 exception in my firewall for 'MySQL Server'.

like image 328
Cameron A. Ellis Avatar asked Sep 23 '08 03:09

Cameron A. Ellis


People also ask

Can not connect MySQL server on localhost 10061?

From the documentation: (10061) indicates that the network connection has been refused. You should check that there is a MySQL server running, that it has network connections enabled, and that the network port you specified is the one configured on the server .

How do I fix error 10061 in MySQL?

To fix this error, you need to make sure that your MySQL server service is actually running in the Services panel. Then, scroll through the services list until you reach the services that start with "M" to look for MySQL services. Usually, you have the MySQL version number attached to the service name.

Can not connect to local MySQL server?

Here are some reasons the Can't connect to local MySQL server error might occur: mysqld is not running on the local host. Check your operating system's process list to ensure the mysqld process is present. You're running a MySQL server on Windows with many TCP/IP connections to it.

How do I access MySQL server on localhost?

Connecting via a standard connectionEnter 127.0. 0.1 for the host. The default username for a new MySQL installation is root, with a blank password. You can leave the port field blank unless your server uses a different port than 3306.


2 Answers

Got this error on Windows because my mysqld.exe wasn't running.

Ran "C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld" --install from the command line to add it to my services, ran services.msc (start -> run), found the MySQL service and started it.

Didn't have to worry about it from there on out.

like image 68
ryanjones Avatar answered Sep 17 '22 14:09

ryanjones


To resolve this problem:

  1. go to the task manager
  2. select Services tab
  3. find MySql service
  4. Running

That's all.

like image 38
JapoDeveloper Avatar answered Sep 19 '22 14:09

JapoDeveloper