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

TomJ picture TomJ · Mar 11, 2014 · Viewed 17.4k times · Source

Please don't post this question as duplicate. I am trying to configure mysql for about 3 weeks now. Someone should really help me.

I recently installed MySQL 5.1 in a Lenovo laptop to do my project. The laptop is running on Windows 8. The installation was fine but when I tried to configure MySQL it worked till the last page.

There am getting Error Nr 2003.

I tried it through the command prompt, through services in the control panel. But the problem is that the mysql service is not starting at all. Why it is not starting ? What will be blocking it from starting ?

Answer

ShinnedHawks picture ShinnedHawks · Dec 17, 2014

First you need to start mysql service it is the problem for this above error.

In case you cant start mysql service means you need to install mysql service.

Steps for install mysql service

Step 1: open command prompt and go to the mysql installed location (for example c:\Program Fiels\MYSQL\Mysql Server5.0\bin\)

Step 2: mysql --install

Step 3: start mysql service using the command NET START MYSQL command

then connect mysql using username and password.