mygratory

Easily migrate a MySQL database from one host to another.

mygratory

Easily migrate a MySQL database from one host to another. Internally, this leverages mysqldump and mysqlimport for efficient transfer of data. It also displays the name of the master bin log and log position for migrating to a replication server.

npm install mygratory

Add your host, database, user and password information to config.json

// set pool max connections = # of tables in SOURCE
var 
  maxConnections = 200;
 
module.exports = {
  source:{
    host     : '127.0.0.1',
    port     : 3306,
    user     : 'root',
    password : '',
    database: 'test',
    connectionLimit: maxConnections,
    multipleStatements: true // leave this
  },
 
  dest: {
    host      : '127.0.0.1',
    port      : 3306,
    user      : 'root',
    password  : '',
    database  : 'test1',
    connectionLimit: maxConnections,
    multipleStatements:true // leave this
  }
};

npm start