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

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 ?

Answers


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.


Assuming the service is already running and you still get this error connecting to the localhost using the mysql client, then make sure you have an entry for "localhost" in your hosts file. This was the case I experienced.


I resolved this situation following the following process. After adding the MySQL path to the environment, I kept invoking the program and then checking Event Viewer in the Application Log for MySQL errors that referenced old commands in the ini file. After removing them, what was hanging me up was that the installer was looking for errmsg.sys in a folder that didn't exist, \bin\share. Those folders DO exist, but on the same level, not nested. So I added the folder share to bin and copied errmsg.sys from share to the new nested share, and it worked. Now that its running, I intend to redo a proper configuration using the workbench, just to gets my ducks in a row. hth


Go to Run type services.msc. Check whether MySQL services is running or not. If not, start it manually. Once it started, type mysqlshow to test the service.


Need Your Help

Stopping fixed position scrolling at a certain point?

jquery css positioning

I have an element that is position:fixed and so scrolls with the page how i want it to however. when the user scrolls up I want the element to stop scrolling at a certain point, say when it is 250p...

click on a button inside ng-repeat

angularjs webdriver protractor

I'm trying to find an element which is a button and click on it in protractor but I'm getting an error element is not visible.