Tuesday, September 17, 2013

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

No comments:

Post a Comment

Dear User,

Thank you very much for your kind response