Reputation: 4472
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!
Upvotes: 0
Views: 2669
Reputation: 6842
Trying browsing to your mysql install directory and running mysqld.exe see if works then if it does mysql was not running as a service
mysqld.exe is the service (deamon on linux) or the server program if you dont service it mysql.exe is the mysql connection client
Upvotes: 0
Reputation: 360782
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.
Upvotes: 0
Reputation: 19635
Chances are that because you're not explicitly specifying a host when you attempt to connect, MySQL is attempting to use localhost
but it is not resolving properly. Try explicitly specifying the host as your loopback address.
Try this:
mysql -h127.0.0.1 -uroot
You might get an error denying your connection because you're not giving a password. If that's the case, just add it to the end of the command:
mysql -h127.0.0.1 -uroot -pYOUR_PASSWORD
Upvotes: 1