Monday, 21 October 2013

Script for Automatic Restart of Mysql Server

 Note that below script will check whether MySQL is up or not.

#!/bin/bash

#Checking whether MySQL is alive or not

if mysqladmin -u root -pxxxx ping | grep -q "alive"; then

echo "MySQL is up"

else

/etc/init.d/mysqld restart

fi

No comments:

Post a Comment

Configure EKS Persistent Static Storage With Elastic File System Using Terraform

  checkout :https://youtu.be/QuUIgQWBBZM