Sync MySQL Databases – How to Synchronize Two MySQL Databases

databaseMySQLsync

What is a good way to sync two MySQL databases?

I would like to sync the data in my production website's database to my local development database. Right now, I am just using the PHPMyAdmin interface to export it from one, and then I import it into the other.

These would be user-initiated sync's, not necessarily periodic or automated (something like a one-click sync).

Best Answer

Here are a couple of ideas:

  1. Use Replication: http://www.howtoforge.com/mysql_database_replication
  2. Use mysqldump in an import/export script to semi-automate it
Related Question