lundi 8 décembre 2014

How to slow down MySQL service autostart on boot (dependency on another service)


I'm running a MySQL database on Debian on RaspberryPi (Raspbian). I would like to use the RaspberryPi as a local MySQL server, but to have the MySQL database datadir outside RaspberryPi's SD card - occasional SD card corruption.


I've successfully managed to move the database data on external harddrive connected to RaspberryPi. The only problem is, the harddrive is encrypted and it must be mounted before it is possible to use it, but MySQL server is starting before it is mounted.


How can I make the MySQL service dependent on my custom mount script daemon service? Or somehow just slow down the MySQL autostart so it will start as the latest?


I've tried adding:



// *** /etc/init.d/mysql file ***
# Required-Start: $remote_fs $syslog mymountservice


But it won't work.



Aucun commentaire:

Enregistrer un commentaire