2010-02-10 19:38

The well known way to remove a service from system boot under Debian / Ubuntu, without removing the package:

update-rc.d -f mysql remove

This command removes all /etc/rc*/*mysql* symbolic links. At next boot, the service is not started.

Problem: when you update the mysql package (aptitude update), symlinks are created again.

Solution: in the last update-rc.d versions, there are disable / enable commands:

update-rc.d mysql disable

Useful if like me you only start apache or mysql some times for Web development. Also useful if you share files with Samba and only want to start the daemon occasionaly.

Note: update-rc.d --help tells us that The disable|enable API is not stable and might change in the future.

References:

2010-02-10 19:38 · Tags: ,

3 Comments

  1. Anony Mouse

    Doesn’t work. When typing:

    update-rc.d mysql disable

    update-rc.d: warning: /etc/init.d/mysql missing LSB information
    update-rc.d: see <http://wiki.debian.org/LSBInitScripts&gt;
    System start/stop links for /etc/init.d/mysql do not exist.

    Looks like the geniuses at Debian/Ubuntu messed up. This is Ubuntu 10.04.2 LTS

    Reply

  2. It’s probably because the mysql service is now handled via upstart in ubuntu.

    Edit /etc/init/mysql and comment the “start on” line.

    For more info: http://askubuntu.com/questions/19320/whats-the-recommended-way-to-enable-disable-services

    Reply

  3. Pingback: B:datenbrei : Blog Archive : Debian GNU/Linux update

Leave a Reply to Marc Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>