Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
mysql2git: Dump MySQL databases into Git repo
tree: 314bfde7ea

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
README.md
mysql2git.sh

README.md

mysql2git

by Remi Plourde

http://github.com/remino/mysql2git

Dump schema and data of each table in selected or all databases of a MySQL host into a Git repo.

Installation

It's a shell script for Bash. Just make sure MySQL and Git are installed.

Configuration

It's recommended to set username and password in ~/.my.cnf to avoid typing your credentials every time this script launches any MySQL binary:

[client]
user=mysql_username
password=mysql_password

Usage

Usage: mysql2git.sh [options] dump-dir [db1 db2...]

  options:
    -u username -p password -h host
      MySQL username, password, and host.
    -m message
      Git commit message.

Links

Information related to storing MySQL dump files into a Git repo:

Something went wrong with that request. Please try again.