Backing up a mysql database

I had the need to do a backup and compress a mysql database, so this is how I did it.

mysqldump --opt databasename -uUsername -p | gzip > databasename.sql.gz

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.