[ubuntu-uk] Shutdown mysql with cron

Glen Mehn glen.mehn at oba.co.uk
Wed Aug 11 09:00:22 BST 2010


  The other thing you could do rather than stopping mysqld completely is 
do to a LOCK TABLES then
FLUSH TABLES, which avoids you having to stop the server, suspend 
transactions, and run crontabs as root.  (obviously, you'll need to 
UNLOCK TABLES again afterwards)

This could all be in the backup script that you run. This is how we used 
to back up our 60TB Oracle DB (Though with different command syntax, of 
course...)

http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html

Hope this helps,

Glen



More information about the ubuntu-uk mailing list