I'm running a ubuntu 10.04 box. I want to enable Mysql on startup. Typically, I used the following command:

#update-rc.d mysql defaults

Mysql still doesn't start when system boots. Suggestions?

  • How did you install it? like.. from apt? or from any other source. – jagbandhuster Sep 16 '11 at 16:56
  • From the repositories (apt) – lisa17 Sep 16 '11 at 17:56
  • Then check out the command services --status-all. Does it show the mysql service? Probably you have already done that.. Still to confirm – jagbandhuster Sep 16 '11 at 18:02

Ubuntu 10.04 uses Upstart to control the behaviour of startup services. You can find the conf scripts at /etc/init (e. g. mysql.conf).

The MySQL script requires a net-device-up and this can cause some trouble. Check this part of the script:

start on (net-device-up
         and local-filesystems
         and runlevel [2345])
stop on runlevel [016]

You can safely remove the net-device-up directive.

start on (local-filesystems
         and runlevel [2345])
stop on runlevel [016]

Now, the script only depends on runlevel and mounted partitions/fs. If after that the problem still persists, you should look for lock/permission problem in your log files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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