Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Windows Server 2003 MySQL 5.x

Hi Guys,

I have a service that requires mysql to be running when starting up. I'd like ensure that mysql itself starts well before other windows services during reboots. Is there a way I can easily set this up?

Ideally, I'd like some way within windows to establish start up order or implement a delay mechanism for other third-party services. I've seen other methods implement a sleep timer for the services but I'm not too comfortable with this...

Any suggestions?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

In Windows 2003, service dependency order is your only mechanism for changing the order that Service Control Manager starts services w/o writing code.

You should identify the specific services that you want to start after MySQL and add depedency entries such that MySQL is started first. (Whether or not you can actually get what you want will depend on exactly which services you're trying to start MySQL before.)

share|improve this answer
    
Yup, sounds good, and when you think about it, it's probably the way things should be. Can you imagine the support calls - "I changed the startup order and now my machine is broken" - eeewww. That aside, if service A depends on service B then the depencency stuff seems the best place to control the order. –  Darth Satan Nov 12 '09 at 23:59

Not easily like Unix allows us to do, but you have make a service dependant on another service, and it wont start till after that service starts. If you want the service to start right at the bottom of the queue, make it dependant on the login service or the DHCP service if you have it installed. Netlogon is one of the last to start because of the need for so many other services and will ensure your process starts very late into the boot cycle.

share|improve this answer
2  
I initially upvoted this--Microsoft's own lit agrees with you--but today I realized that this approach means that if you need to restart, say, the DHCP service, it downs whatever services you have made dependent on it that actually aren't. –  Kev Aug 17 '10 at 12:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.