Skip to content

Mysql database table structure, stored procedures, functions, views, table data comparison tool, the difference generated SQL, support SSH connection.mysql 数据库表结构,存储过程,函数,视图,表数据对比工具,差异生成SQL,支持SSH连接。

Notifications You must be signed in to change notification settings

LiveXY/mysqldiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mysql 数据库表机构对比工具

#centos7 安装nodejs

rpm -Uvh https://rpm.nodesource.com/pub_5.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm
yum install nodejs -y

#获取代码安装

git clone https://github.com/LiveXY/mysqldiff.git
cd mysqldiff/
npm install && npm link

#实例

#base
mysqldiff --db1=dbuser:dbpassword@dbhost~database --db2=dbuser:dbpassword@dbhost~database
mysqldiff -1 dbuser:dbpassword@dbhost~database -2 dbuser:dbpassword@dbhost~database
#reverse
mysqldiff --db1=dbuser:dbpassword@dbhost~database --db2=dbuser:dbpassword@dbhost~database --reverse
mysqldiff -1 dbuser:dbpassword@dbhost~database -2 dbuser:dbpassword@dbhost~database -r
#port
mysqldiff --db1=dbuser:dbpassword@dbhost~database#dbport --db2=dbuser:dbpassword@dbhost~database#dbport
mysqldiff -1 dbuser:dbpassword@dbhost~database#dbport -2 dbuser:dbpassword@dbhost~database#dbport
#ssh
mysqldiff --db1=dbuser:dbpassword@dbhost~database --db2=dbuser:dbpassword@dbhost~database:dbport+sshuser:sshpassword@sshhost#sshport
mysqldiff -1 dbuser:dbpassword@dbhost~database -2 dbuser:dbpassword@dbhost~database:dbport+sshuser:sshpassword@sshhost#sshport
#data
mysqldiff --db1=dbuser:dbpassword@dbhost~database --db2=dbuser:dbpassword@dbhost~database --diff=data --table=db1tablename:db2tablename
mysqldiff -1 dbuser:dbpassword@dbhost~database -2 dbuser:dbpassword@dbhost~database -d data -t db1tablename:db2tablename

#运行环境 支持linux、mac,ssh不支持windows

About

Mysql database table structure, stored procedures, functions, views, table data comparison tool, the difference generated SQL, support SSH connection.mysql 数据库表结构,存储过程,函数,视图,表数据对比工具,差异生成SQL,支持SSH连接。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published