MySQL-logo

Script to automatically start mysql

The following script is used to  start mysql automatically when it is failed or stopped on the server. You can set 2 min cron “*/2 * * * * /bin/sh /root/automysqlstart.sh” and it restart the mysql automatically. #!/bin/bash #Checking whether MySQL is alive or not if mysqladmin ping | grep -q “alive”; then echo “MySQL is up” […]

See More

Script to restart any service automatically

We can set the cron to restart the server when it was down or not running. You can use following script to detect and restart the httpd,ngnix,Serv-U or any other services. 1) Create the file vi /root/autorestart.sh and add the following code and save it. You can replace the Serv-U with any your service like […]

See More