this is a simple wrapper tool with some extras to mysqlump like connect your changes into a git repo or sync from server a to b

v0.3.4 2017-07-25 00:06 UTC

This package is auto-updated.

Last update: 2022-06-08 02:48:01 UTC


Mysql/MariaDB tool for re-sync, copy and upgrate databases from one server to another.



Before start to use

  1. Add with mysql_config_editor all your --login-path, source and destination
  2. make sure you have a default mysql client configuration in ~/.my.cnf
  3. have manual backups of your database.


Clone this repo

$ git clone
$ ~/mysqloffsync

your execute file will be in $ ~/bin/mysqloffsync

By composer

$ composer require caherrera/mysqloffsync

your execute file will be in

$ ./vendor/bin/mysqloffsync 

First Time

Before to start to use the software you will need to configurate some stuff

  1. Setup your login-path in mysql
$ mysql_config_editor set --login-path=production.server.local --user=db_owner --password

$ mysql_config_editor set --login-path=dev.server.local --user=db_owner --password
  1. Next set up your mysqloffsync.ini file
$ mysqloffsync --setup 
  1. And edit your file using your favorite editor
vim ~/.mysqloffsync/mysqloffsync.ini 

Get some help

$ mysqloffsync -?


Copy all tables (default)

$ mysqloffsync

copy views|routines|functions

$ mysqloffsync v|r|f

copy some views

$ mysqloffsync v view_prefix_% v_list1 v_list2