问题
11:11:45 [mysql] Attempting to start MySQL service...
11:11:45 [mysql] Executing "net start "mysql""
11:11:45 [mysql] Return code: 0
Finally changed all my ports to the correct value (3306 to 3307) and now the this is the only error I'm coming across.
回答1:
I have faced similar problem. The error is because of either of 2 reasons. First -> Service Disabled Second -> Path of service is changed or MySQL server is deleted.
Steps
Try to run "net start mysql" in cmd. You don't have to change port for it in xampp. If it shows error 1508 it means that your service is disabled. Go to Search->type Services-> mysql->Right click->Change startup type to automatic
then again type "net start mysql" in cmd. If the shows "the service is starting.." then run mysql server from xampp
if it shows error 2 this means that mysql path is different or mysql server is deleted. Now, go to search->regedit.exe->search mysql -> change the value to xmapp mysql bin folder and run mysql_upgrade_wizard in bin.. Now in my case i had mysql server 5.0 , After upgrading my xampp sql server ran smoothly
来源:https://stackoverflow.com/questions/36979998/cannot-execute-mysql-service-xampp