Re: Best method for stopping/starting MySQL?
You might also consider a backup method which does not require MySQL to
be stopped. Here's what I use, as I have some InnoDB tables:
19.10.2009 20:49, Tim Legg kirjoitti:
I would like to shutdown mysql periodically to make backups of the
databases. I would like to know what is the official Debian way of
stopping and restarting MySQL.
For some databases, daily:
mysqldump -u backup -psecret --databases verses finance Calendar
domestic music MasterDirectory | bzip2 > $OF
or all of them, less often:
mysqldump -A -u backup -psecret | bzip2 > $OF
All my databases are human-driven and the backup jobs run when nothing
else will be happening, so I don't bother locking things, but you
obviously can. This all happens at the database level, so there's no
flushing to disc to worry about.
If you use phpMyAdmin, that can also backup and restore databases online
remotely using a browser, but I don't think it can be scripted locally.