From http://www.thegeekstuff.com/2008/09/backup-and-restore-mysql-database-using-mysqldump/