kal43
By:
kal43

start a service only after mysql has entered Active (running) state

October 16, 2017 112 views
MySQL CentOS

I have a service that requires mysql to be fully up and running before it starts otherwise it fails. I have very alrge mysql databases and mysqld takes up to 40 minutes before entering an active (running) state.

I have tried adding After=mysqld.service in the secondary services .service file {unit] section without success. It starts my secondary service ass soon as mysqld is enabled. I have tried using Wants=mysqld.service and Requires=mysqld.service without success.

Any help or suggesstions would be appreciated.

Thank you

Be the first one to answer this question.