When a server reboots, it is best practice to have services auto start where possible to minimize the amount of manual work needed. For MySQL and Mirth, these can be set to auto start but must start in a sequence where MySQL starts before Mirth. Here are the steps to set these to auto start and in the proper sequence.
1. When MySQL and Mirth are installed the startup scripts are located somewhere like the following:
2. To review the current services to startup on system book issue this command
Here is what it may look like when MySQL and Mirth are added to the startup cron. Notice they are present and have “on” listed for some entries.
mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
messagebus 0:off 1:off 2:on 3:on 4:on 5:on 6:offmirthconnect 0:off 1:off 2:on 3:on 4:on 5:on 6:off
mysqld 0:off 1:off 2:on 3:on 4:on 5:on 6:off
3. If you see MySQL and/or Mirth listed with all “off” you need to add them. They can be added with
sudo chkconfig mysqld on
sudo chkconfig mirth on
4. The last step is to confirm the startup order is set in the respective startup scripts. Edit each script and confirm they have entries as follows. Notice the MySQL number is less than the Mirth number and hence will startup first. The highlighted numbers are the ones that matter.
# mysqld This shell script takes care of starting and stopping
# the MySQL subsystem (mysqld).
# chkconfig: – 64 36
# mirthconnect Start Mirth Connect service
# chkconfig: 2345 80 20
# description: Starts and stops Mirth Connect service