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:
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>
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
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
Pingback: B:datenbrei : Blog Archive : Debian GNU/Linux update