phpmysqlzend-frameworkmysqlimysql-error-2003

Help in Running MySQL. SQL yog gives error HY000): Can't connect to MySQL server on 'localhost' (10061)


hi guys i have mysql installed in my system, when i right click on apache icon in the system select the service MySql and start it, it says

windows could not start the MySql service on local computer the system cannot find the path specified

and when i do

C:\Users\User>mysql -u root
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)

no mysql is running in the task manager. i have definetly have mysql installed coz when i do

C:\Users\User>mysql --version 
mysql Ver 14.14 Distrib 5.1.50, for Win32 (ia32)

And when i try to configure my sql by running MySQLInstanceConfig.exe from install directory. it says

   A windows service by the name of MySql already exists. Please

uninstall the service correctly or choose a different name for the service

Using zend framework for my php, php is running fine.

Any help is appreciated!


Solution

  • The first error says it all - MySQL could not start up. Therefore there's nothing listening to the various connection points so the client can't connect.

    Check that the service's definition for files/locations matches where your MySQL is actually installed. Did you install MySQL separately, or as part of a package like WAMP/XAMP? It'd be very odd if the packaged version was mis-installed.