Page 1 of 1

MySQL service not restarting automatically after Win update

PostPosted: 12. April 2007 17:07
by mungrin
I am using Windows Server 2003 to run XAMPP 1.5.5. Everytime my box does a windows update & automatic restart, Apache restarts no problem,but MySQL does not. The checkbox is still ticked that it's on as a service, it's just not running. If I manually hit the "Start" button on the XAMPP control panel, it starts fine and everything works well after that, but it is getting to be a real pain and it is discouraging the people I have recruited to test the site because it's so often down.

Any suggestions?

Thanks!

Mark

PostPosted: 13. April 2007 03:34
by WorldDrknss
Have your tried reinstall the mysql service?

You can easily achieve this by un-checking the mysql service box then re-checking it or at the command prompt use the following commands:
mysqld --remove
mysqld --install

Nope, MySQL service uninstalls by itself.

PostPosted: 13. April 2007 15:24
by mungrin
No, unfortunately now when it reboots the MySQL "SVC" box becomes unchecked, i.e. it is checked, I start MySQL, I reboot, now it is unchecked, MySQL not running. Apache still starts up automatically though.

I am guessing I have done something dumb somewhere, but no idea where.

PostPosted: 13. April 2007 20:33
by Codesmith
He was asking you to ignore the xampp control panel and reinstall the service manually.

Open a command prompt, browse to the folder with mysqld in it and type the commands he mentioned.

then type services.msc to verify the service in installed.

Also you can start and stop the services with the following commands

net start mysql
net stop mysql

Also double check your windows firewall settings, they sometimes change after an update.

interesting but still not working, more info now though...

PostPosted: 13. April 2007 21:33
by mungrin
OK, so I did it manually as you suggested, that was interesting:

From the CMD line, with MySQL supposedly installed as a service from the XAMPP panel:
Code: Select all

C:\Program Files\xampp\mysql\bin>mysqld --remove
The service doesn't exist!

C:\Program Files\xampp\mysql\bin>mysqld --remove
The service doesn't exist!

C:\Program Files\xampp\mysql\bin>mysqld --install
Service successfully installed.

C:\Program Files\xampp\mysql\bin>net start mysql
The MySQL service is starting.
The MySQL service could not be started.

A system error has occurred.

System error 1067 has occurred.

The process terminated unexpectedly.



any idea what that could be? (from services.msc, the MySQL service is installed, I tried rebooting, same as initially, XAMPP thinks it is installed as a service, but it doesn't run)

also now I can't start MySQL from XAMPP either (i.e. I had to use mysqld --remove from the CMD line, then I could start it from XAMPP)

At least this explains the difference between my original post (mysql svc checked) and after the first reboot. Maybe provides some clues to the cause of the problem too?

...follow-up...

PostPosted: 13. April 2007 21:52
by mungrin
Following up on the above, since I was getting differing behaviour depending on how I tried to set up the service, I tried the method from http://www.apachefriends.org/en/faq-xampp-windows.html#services to see if it did things differently, and it seems to have worked (fingers crossed - it has rebooted once and restarted as intended)

hopefully that did the trick

thanks!

Mark