mygratory

0.3.0 • Public • Published

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.

Install

npm install mygratory

Configure

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
  }
};

Run

npm start

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i mygratory

    Weekly Downloads

    10

    Version

    0.3.0

    License

    none

    Last publish

    Collaborators

    • talentedmrjones