Shell script to restart MySQL server if it is killed or not working

We will create a bash script and run via cron job and set the time as per your requirement. If you don’t know how to create bash script, please read “How to create Linux bash script”