Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up a VirtualHost on my local machine (Windows XP with XAMP installed) and installed Zend there as well, now I'm trying to connect to the MySQL database and I get the following error message:

Message: SQLSTATE[HY000] [2003] Can't connect to MySQL server on '''' (10060)

All the tips I've found via Google haven't helped. I use Kaspersky AntiVirus and have added port 3306 to the allowed list for MySQL and Apache. I've also pinged and get a response (with IP address, though localhost:3306 and aren't found. I've checked that other WebApps can still access MySQL if the virtual host is pointed at them instead and my non Zend Apps do work.

I guess I have to do something further to the port, or maybe force the App to use a different port, but am not sure how to do either.

Any help appreciated.

share|improve this question

localhost:3306 and aren't found

ping cannot be used to verify a port's state, as it's in a different TCP/IP layer and doesn't use a port. Try

telnet localhost 3306

If you can connect, you should see a number of unintelligible characters. This is the MySQL connection ready string.

It seems other apps can access MySQL - when Zend is configured, try running xampp-portcheck.exe (in your xampp root) and, if all's ok, starting xampp-control.exe to ensure the MySQL service is running (although it seems likely it is).

I've also pinged and get a response (with ip address,

Is your internet facing IP address? It you are setting this up for local dev you're better off configuring the vhost's hostname in your C:\WINDOWS\system32\drivers\etc\hosts file and directing it to - if isn't your address, you're testing another server (it currently redirects to a Dutch holding page).

share|improve this answer

Assuming at least one of the App is ALREADY able to connect to MySQL server, you do not need to open more ports with Kaspetsky AntiVirus, so if I were you I'd look the app that IS able to connect and copy database hostname from there and into your new app.

share|improve this answer

Your Answer


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.