Backing up MySQL database in mysqldump

by Forrest Sheng Bao http://fsbao.net

MySQL official documentation provides two ways to backup. One is mysqldump. Another is mysqlhotcopy. But I don't like mysqlhotcopy since I don't like seeing so many table files. So I like mysqldump, giving me just one sql file.

mysqldump --user=root -p drupal > newdrupal-20080614.sql
You will be prompted the password. And then I will using bzip2 newdrupal-20080614.sql to compress it.