Mysql – Using MySQL Workbench, what is a good way to do development on an alternate server and copy changes to the main server

MySQL

This is a noobie question. I'm taking over a database project from someone who recently left the company and I'm looking for advice on how to do some development on a test platform before making changes on the active server. I've got MySQL installed on both the server and my local machine, with MySQL Workbench as the interface to both. Apache and PHP are also installed on both platforms.

I think what I want is a local copy of the schema (including data) that I can occasionally synchronize with the server. So when I want to do any development I would:

  • pull any changes from the server

  • make changes locally and test them out

  • then copy the modifications back up to the server.

Is that what people do in practice?

If No: What is the recommended way to do development without messing up the existing database?
If Yes: Can you offer some details on how to do this with MySQL Workbench.

Thank you, and please let me know if you need any more information.

Best Answer

What I traditionally do, if I can't sync between databases, is take a copy of the schema, add dummy data, and develop on that locally. Then I save all my modification scripts and run them on the main server when I'm ready to push.

I would avoid moving data from development to production. Production -> Development may be fine if you don't have large amounts of data. Otherwise, use a dummy data generator if you can.

Ultimately, you'll have to develop your own methodology just like you do when you introduce version control or backups to a project. It is dependent on the situation.