This is a small console tool written in Python. It allows to dump MySQL database into easy to edit files and directories and push it back to MySQL server with your changes.
sqltool.py [options] [operation [object_type [object_name]]]
dump or restore (default - dump)
- table
- view
- proc
- fun
- structure
- all (default)
-h- short help-Hor--host- MySQL host (default: 127.0.0.1)-uor--user- MySQL username (default: root)-por--password- MySQL password (default: yoursuperpassword)-dor--database- MySQL database name (default: test)-Dor--prefix- path to structure files (default: ./db/)-ior--ignore-file- path to file with list of tables data from which shouldn't be imported (each table name should be a newline with empty line before EOF
- Python >= 2.6
- MySQLdb (python-mysql or python2-mysql)
- mysqldump (mysql-client)
You are welcome with questions and suggestions. Please email Shvein Anton: t0hashvein@gmail.com