1

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 127.0.0.1:3306: Can't connect to MySQL server on '127.0.0.1' (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!

1 Answers1

0

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('127.0.0.1:3307', '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.

cwallenpoole
  • 325
  • 2
  • 13
  • 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? –  Jul 05 '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! –  Jul 05 '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 05 '11 at 18:14