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 mymountserviceBut it won't work.
How to slow down MySQL service autostart on boot (dependency on another service)
mysql;debian
Editing the LSB init.d info header in an init.d script will not directly modify the start order and such. To make the system re-examine all init.d scripts and apply any changes you need to run the insserv command after editing.