Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 downloaded MySQL last week and I've been having a ton of problems getting things to work. I ended up reinstalling it and setting the port to 3307 because for some reason 3306 was greyed out. When I installed it I got an error that the server wasn't configured, but I was able to get a connection working just fine.

Now (a few days later) I'm trying to restart that connection and I keep getting this error:

Cannot Connect to Database Server - Your connection attempt failed for user 'root' from your host to server at Can't connect to MySQL server on '' (10061).

I've tried adding exceptions to my firewall to ports 3306 and 3307 and running a new instance configuration wizard (which crashed when it tried to start a service). I'm really new to MySQL and could definitely use help! Thanks!

share|improve this question

migrated from Jul 7 '11 at 4:20

This question came from our site for professional and enthusiast programmers.

You should tag your question with the operating system in question. – Szocske Jul 5 '11 at 17:12
oh thanks, i will – sad-ducky Jul 5 '11 at 17:23
Have you followed any documentation or have you just "had a go at it" on your own? – John Gardeniers Jul 7 '11 at 5:02
up vote 0 down vote accepted

I've had that happen (on XP and 7), and the easiest way was to use WAMP or XAMPP. If those aren't options (all of these have worked for me at some point):

  • See if you can't just set the port for the connection request. You might just need mysql_connect('', 'mysql_user', 'mysql_password'); (not sure you're using PHP, but you can set the port on most language DB interfaces)
  • restart the MySQL service
  • use netstat -n to see if there are anything on those ports. It might be that MySQL is running on 3307 try that.
  • tasklist and see if MySQL is open twice. If it is, kill both instances and then restart the server.
  • use taskkill to kill MySQL. Open MySQL. repeat above step.

I always end this type of post in a similar manner -- The spectral wolf fears only fire. The Google maps team can no longer help you, but if you master the wolf, he will guide you. Godspeed.

share|improve this answer
Hi thanks for the reply! I'm actually not using wamp, xampp or php. I tried restarting MySQL (many, many times), nothing's running on either of those ports, and I've used task manager to kill MySQL and restart the server - and I'm still getting the same error message. Do you know of anything else that works? – sad-ducky Jul 5 '11 at 17:58
Ahh what the heck! It's working now, although it's still tells me it's unable to start the service. I don't understand, but thanks for the help! – sad-ducky Jul 5 '11 at 18:10
I never said that any of it made sense. Heck. Once I had Windows tell me that there was nothing listening to port 80 while it was telling me that Apache could not start because port 80 was being used. Turned out that Apache was running, but it was not showing in tasklist or netstat... – cwallenpoole Jul 5 '11 at 18:14

Your Answer


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