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

Agent Installation on Windows Server. SQL Server (Failover Cluster) target addition in OEM 12c

Oracle 10g/11g Linux:SMS the alert logs ORA- errors generated in timestamp

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