This project contains scripts to establish a secure tunnel to a MySQL server and dump the table schemas, stored procedures, and functions.
mysqldump
utility installed on your local machine.env.example
file and rename it to .env
..env
file and replace the placeholders with your MySQL server credentials and address.Host my-proxy-hostname
HostName my.mysql.server
ControlPath ~/.ssh/my-proxy-hostname.ctl
To establish a secure tunnel to the MySQL server, run the establish_tunnel.sh
script:
./scripts/establish_tunnel.sh
To dump the schemas of the tables in the MySQL database, run the dump_schemas.sh
script:
./scripts/dump_schemas.sh
The dumped schemas will be stored in the dumps/schemas
directory.
To dump the stored procedures in the MySQL database, run the dump_routines.sh
script:
./scripts/dump_routines.sh
The dumped routines will be stored in the dumps/routines
directory.