error 2003: Can't connect to MySQL server on 'localhost' (10061)

For the other newbie people who have the same problem as me (windows 7 64 bit):

Early versions of the MySQL installer does not set up the windows service at all (David Newcomb). I have spent 2 days googling and faced a lot of confusing answers that did not worked for me, then I found the following solution:

net start mysql

,when the service is installed you should be able to enter the above command to start the service. my version of mysql is 5.6 (the newest one up to know), so you do not have to install the old versions as it is suggested.

See MySQL Error 2003: Can't connect to MySQL server on 'localhost' ,thank to @David Newcomb response.


I couldn't call mysql from the command prompt after about 15 hours of effort, so I quit. Instead, I installed version 4.1.22. If you go to mysql main webpage, you won't find 4.1.22 in the archive. Instead, I searched for mysql 4.1 in google. Hopefully they haven't removed it when you try it.

I downloaded the "Essentials Package" and chose the "typical install" option. I then went to Start -> MySQL ... MySQL Server Instance Config Wizard and chose "Install as Windows Service" and "Include Bin Directory". There's a drop down box where I could choose the name, like "MySQL" or something else. It complained when I chose "MySQL", saying that I already had an installation. I changed it, then it installed. From there, I could call "mysql" from the command line.

If you can't find v4.1 or want to use v5, something along the lines of:

http://www.devside.net/guides/windows/mysql

may work with modification, but it didn't work after following their instructions, with the exception of using version 5.5 instead of v5.1.

Good luck.


Check if MYSQL service is installed in services.msc In case not, go to services.msc & check if windows firewall is up. if yes, stop it.

  1. open cmd as an administrator and go to bin folder of your MYSQL installation.
  2. type mysqld --install. It will successfully install service.

Now start the MYSQL services and try to configure the same.