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'.
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 .
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.
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.
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.
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.
To resolve this problem:
That's all.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With