Skip to content

Instantly share code, notes, and snippets.

View henke-andersson's full-sized avatar

henke-andersson

View GitHub Profile
@sjparsons
sjparsons / dump-all-databases.sh
Created July 2, 2012 19:29
Backup each MySQL database on a MySQL server into a separate file.
#!/bin/bash
# dump-all-databases.sh
#
#
# Backup each MySQL database on a MySQL server into a separate file.
# Optionally files can be gzipped (dbname.sql.gz)
#
# Usage: dump_all_databases [ -u username -o output_dir -h hostname -x exclude -z ]
#
# -u username to connect MySQL server