1

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?

2 Answers 2

7

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.)

1
  • 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. Nov 12, 2009 at 23:59
2

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.

1
  • 3
    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, 2010 at 12:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .