Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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 '127.0.0.1' (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: http://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!

share|improve this question
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 '11 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 '11 at 3:45
    
Apologies for the non response. I was able to resolve the issue with Randy Melder's solution. –  Zigu Jul 12 '11 at 23:30

2 Answers 2

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '11 at 23:32
    
@Zigu: You can set the service to start automatically, not manually. –  ypercube Aug 28 '12 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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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