patternsqlMinor
Can't connect to MySQL DB
Viewed 0 times
canconnectmysql
Problem
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:
Ruby on rails on Server start up returns:
MySQL Command Line Client returns:
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:
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!
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:
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 failedsc 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!
Solution
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.
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.
Context
StackExchange Database Administrators Q#3635, answer score: 2
Revisions (0)
No revisions yet.