An open API service indexing awesome lists of open source software.

https://github.com/vukbgit/mariadb-tools

a collection of shell scripts to manage mariadb databases
https://github.com/vukbgit/mariadb-tools

Last synced: 2 months ago
JSON representation

a collection of shell scripts to manage mariadb databases

Awesome Lists containing this project

README

        

A set of bash scripts to deal with a MariaDB database

## INSTALLATION ##

* clone repository:

`git clone https://github.com/vukbgit/mariadb-tools.git`

* setup config file:

`cp .config.template .config`

* edit config file setting:
* db_source: name of the database to start comparison
* db_target: name of the database to be compared to db_source
* user: MariaDB user name into scripts
* password: MariaDB user password
* host and port if needed

## SCRIPTS ##

* `export.sh [database-name] [table-name]`: dumps a whole database or just a table if second argument provided

* `import.sh -d [database-name] -f [path-to-dump-file]`: imports a database from a dump file

* `create_objects.sh [object-1] [object-2] ...`: shows create sql for tables/views

* `dev-to-prod.sh [object-1] [object-2] ...`: overwrites PROD db with DEV one __BE CAREFUL!!!__

* `prod-to-dev.sh [object-1] [object-2] ...`: overwrites DEV db with PROD one __BE CAREFUL!!!__