I've been trying to install Apache because I want to do PHP development work.

The install didn't work so I aborted it and wanted to make sure that my other installs using MySQL were still working.

I can no longer seem to connect to my SQL server though.

HeidiSQL returns:

SQL Error (2003): Can't connect to MySQL server on '' (10061)

Ruby on rails on Server start up returns:

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

MySQL Command Line Client returns:

Error 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

I've tried the suggestions found in this thread: https://stackoverflow.com/questions/385292/mysql-cant-connect-to-mysql-server-on-localhost-10061

and have come with the following results:

telnet localhost 3306
Connecting to localhost... Could not open connection to host, on port 3306: Connect failed

sc query mysql [SC] EnumQueryServiceStatus:OpenService Failed 1060: The specified service does not exist as an installed service.

Yet when I look in SQL Server Configuration manager, it says SQL Server (SQLExpress) is in a running State.

I can't seem to troubleshoot this issue. Please help!

  • 3
    SQL Server = Microsoft SQL Server which is completely different product to MySQL (well .. they both DBs, but they are different products).
    – LazyOne
    Jul 4, 2011 at 1:36
  • @Zigu if you would kindly respond to this and help us clarify what is going on in your environment. Otherwise, I think this question is a lost cause because ... it sounds like you are in way over your head and if you've abandoned this question then it's too localized.
    – jcolebrand
    Jul 6, 2011 at 3:45
  • Apologies for the non response. I was able to resolve the issue with Randy Melder's solution.
    – Zigu
    Jul 12, 2011 at 23:30

2 Answers 2


I suspect you are running MySQL on Windows, although you did not mention it. If so, look in your Services and makes sure the MySQL service is started. Here is a link explaining what to do at dev.mysql.com.

If you are trying to connect to SQLExpress, the process is the same as above to make sure the service is running. Then, here is a link explaining PHP SQLExpress connectivity using PDO.

  • Hm. manually starting the MySQL service resolved the issue. My set up used to have MySQL firing as part of start up but I guess something must have taken it out of the initial boot. Now I have to do this every time I wanna use MySQL :S
    – Zigu
    Jul 12, 2011 at 23:32
  • @Zigu: You can set the service to start automatically, not manually. Aug 28, 2012 at 12:54

SQL server configuration manager shows you the settings for Microsoft SQL server. You may have an instance of SQL express running on your machine. To administer MySQL, you can use the command line: Mysql -u user_name -password, if MySQL is in the path, or you can use MySQL workbench if you don't already have it. It looks like MySQL may be down, and you will have to restart it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.