What is the best way/tool to synchronize two MySql servers (not in the same cluster)
-
03-07-2019 - |
Question
I find myself develop apps in my home, which then, on the commercial server are filled with data.
I need a simple and easy way to dump a MySql DB from the commercial server into my private one.
Is there a tool/command to do this?
(I thought about making my DB a slave, but then, I don't always have the permissions to touch the commercial MySql server, and I do develop on my Server...which could cause problems, if they where linked that way).
Solution
This is how you can backup a database and reload it as well.
On master server
mysqldump -u[username] -p[password] databasename > database.sql
Or if you need to include functions and or triggers do
mysqldump -u[username] -p[password] --routines --triggers databasename > database.sql
Copy database.sql to dev server
On dev server
mysql -u[username] -p[password] databasename < database.sql
OTHER TIPS
you might try the SQLyog Job Agent - it's getting good reviews.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow