Cannot connect to MySQL server on localhost?

Post Pic

Hi developers, are you working on any project where in which you have used MySQL as a backend (Database), and have you gone through DOS and tried to run mysql: C:\mysql\bin\mysql.exe, got an error right? don’t worry guys here is the solution with me…


While running mysql have you got an error like the below:

ERROR 2003: Can’t connect to MySQL server on ‘localhost’ (10061)

no worries, firstly check whether mysql service is working or it is in automatic / disable mode, if it in disable mode then just start the service in your local machine – again not working, no worries…. now goto c:\mysql\bin folder find out mysqld.exe in that folder and right click on that file and choose run as (Choose the first option like current user…. / administrator) and hit ok….

now try again going to DOS prompt: C:\mysql\bin\mysql.exe, I think it should work now by viewing mysql prompt as mysql>

Hope this helps you everyone…..

Related Entries...

You Might Like:


Please let us know your feedback about the article through the comments section below, we want to hear from you about our website. And your comment / advice may help us to serve you better in upcoming articles.

Thank You!
Vivekanand [Founder of DeveloperSnippets]

4 Responses


hey it’s not working


sting is the king


Hi. Thanks for sharing its worked fine when i had the similar problem.


I had same issue, now its working fine. thank you..

Leave Your Response