Mysql – Migrate a schema structure from one server to another MySQL

migrationMySQLmysql-workbench

We have two Database environment server (Development and Production).
Production DB is already being used in Production(means it already has production data etc.).

My question is, is it possible to migrate databases(structure only) from Development to Production without affecting the data that is already in the Production server?

Note that, there are already changes made in the Development databases, means some of the tables/columns in a table exist in Development but doesn't exist yet in our Production database.

I'm using Workbench Community 6.2 as client.

Our Development database is using MySQL Community and our Production database is using MySQL Enterprise.

Best Answer

If You already use MySQL Workbench, You can use menu: Database -> Synchronise with any Source

Before apply changes it show You script, which You can copy and if need edit You can test it on copy of databases

Also there are many other tools:

  • Navicat
  • SQLyog
  • dbSchema
  • and etc

example of script:

ALTER TABLE `test_db`.`company1_name` 
ADD FULLTEXT INDEX `Company1_name` (`Company1_name` ASC)