Tomas wrote:
And can I ask how do you do it? Because I don't want to write my mysql password in rc.shutdown script.
Write a script /root/sbin/mysql-shutdown.sh with whatever you need in it, & call that script from /etc/rc.shutdown
Only root can read it. Or: /usr/local/site/sbin/mysql-shutdown.shchmod it 0770, and chown it root:dba so that anyone in the dba group can edit (passwd changes) and run the script.