MYSQL:Restart MYSQL services in solaris using shell script

MYSQL Shut and start service




This script is mainly developed for restarting mysql services in solaris machine.

1.Make one sh file and execute it.

/usr/local/mysql/.profile; sh /usr/local/mysql/shutnstart.sh

2.Here the contents of shutnstart.sh script.

/usr/local/mysql/bin/mysqladmin -u root -ppass shutdown
echo "STOPPING...."

sleep 4
echo "STARTING...."
/usr/local/mysql/bin/mysqld_safe --defaults-file=/usr/local/mysql/my.cnf --user=mysql &
echo "MYSQL STARTED.."

We use the utility of mysqladmin

Comments

Popular posts from this blog

Oracle 12c : How To Purge The UNIFIED AUDIT TRAIL

Oracle 11g: Install Instant Client 11.2.0.3.0 on Linux x86_64 Server.

gDBClone Powerful Database Clone/Snapshot Management Tool (Doc ID 2099214.1)