python tool to compare structures of databases in a distributed mysql data warehouse.
config.json file is for configuring the options. please check example.config.json. connection is established via SSH tunnels. SQLAlchemy is used for reading the database structure. SQLite3 database is used to store info locally in order to query it to find differences.
sudo apt-get install sqlite3
sudo apt-get install libssl-dev
sudo apt-get install libffi-dev
sudo apt-get install python-dev
sudo apt-get install python-pip
https://pypi.python.org/pypi/sshtunnel
sudo pip install sshtunnel
sudo pip install SQLAlchemy
https://dev.mysql.com/doc/connector-python/en/connector-python-installation.html
sudo apt-get install python-mysql.connector
sudo apt-get install python3-dev
sudo apt-get install python3-pip
https://pypi.python.org/pypi/sshtunnel
sudo pip3 install sshtunnel
sudo pip3 install SQLAlchemy
https://dev.mysql.com/doc/connector-python/en/connector-python-installation.html
sudo apt-get install python3-mysql.connector
sqlite3 db.sqlite3
On SQLite console:
.read db.sql
.exit
cp example.config.json config.json
nano config.json
python3 compare.py -h
python3 compare.py clear-cache
python3 compare.py load-all
python3 compare.py compare-all