rKotecha
rKotecha

Reputation: 1

mysql error 2003 (hy000) cant connect to MYSQl server on localhost

I am trying to connect to mysql and keep getting this error:

mysql error 2003 (hy000) cant connect to MYSQl server on localhost (10061)

I tried typing in: sc query mysql to command prompt command line and got:

SERVICE_NAME: mysql
        TYPE               : 10  WIN32_OWN_PROCESS
        STATE              : 1  STOPPED
        WIN32_EXIT_CODE    : 1077  (0x435)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

Upvotes: 0

Views: 2244

Answers (2)

Bhavesh Chetwani
Bhavesh Chetwani

Reputation: 9

You can try this -

  1. Go to Start -> Services.msc -> start mysql service (name could be MYSQL57)

  2. Go to your bin folder in MySQL directory (eg C:\Program Files\MySQL 5.7\bin) -> right click on mysqld.exe -> Run as Administrator

  3. Open cmd in your bin folder in MySQL directory -> execute this command 'mysql -u root -p -> Enter the password

And you are done!!!

Upvotes: 1

mrbellek
mrbellek

Reputation: 2300

The MySQL service is not running. Type sc start mysql to start it.

Upvotes: 1

Related Questions