0

I`m trying to make my mysql server to stop automatically from init.

root@server:/# update-rc.d mysql defaults
 Adding system startup for /etc/init.d/mysql ...
   /etc/rc0.d/K20mysql -> ../init.d/mysql
   /etc/rc1.d/K20mysql -> ../init.d/mysql
   /etc/rc6.d/K20mysql -> ../init.d/mysql

So the first 3 links in rc0, rc1 and rc6 are for the stopping but it doesnt happening. The host is a docker container with ubuntu 14.04 and init is with PID 1.

SScast
  • 59
  • 1
  • 10

1 Answers1

0

For recent and updated versions of Ubuntu, look at the init configuration file of mysql

/etc/init/mysql.conf

these two lines are of interest

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]
Déjà vu
  • 28,223
  • 6
  • 72
  • 100