Synchronize two databases schema in MySQL

前端 未结 6 1723
灰色年华
灰色年华 2021-02-02 15:12

I was looking for a portable script or command line program that can synchronize two MySQL databases schema. I am not looking for a GUI based solution because that can\'t be aut

6条回答
  •  伪装坚强ぢ
    2021-02-02 16:00

    For a long-term, professional solution, you should keep an eye on Schemamatic (http://versabanq.com/products/schemamatic.php). This link shows a GUI app but all it does is manipulate a command-line software. In this page there is link to its google code site where the C# .Net version of Schemamatic can be found. Your perfect solution would be to add support for MySQL to Schemamatic. For SQL Server, it's perfect and does exactly what you mentioned.

    Now, for a short-term solution I would suggest dumping the data you want with MySQL's command-line tools like: mysqldump -A -c -uroot -ppassword >bkpmysql.sql

    And play with it, although it should take quite some time to achieve what you want. Schemamatic really seems to me your best choice. Let me know if you need any clarification when/if trying Schemamatic.

提交回复
热议问题