I have very little experience with MySQL/SQL in general – total n00b really!
I have a live site and dev site which are both hosted by the same ISP but on different servers i.e. mysql1.foo.net and mysql2.foo.net.
I would like to figure out the the easyist possible way to sync the two databases – without having to export the whole thing erase the dev database and restore.
I am afraid there is no “easy” solution. Except for rather smallish databases to dump production and restore on dev during the night. Small is defined as taking <12hrs for the backup restore operations, which is still very sizable.
Replication will probably not cut it since having a read-only copy is of limited value, and I assume you do not want changes on the dev db to propagate to prod.
Dump – Restore (if feasible) has advantages though
– you test regularly that the backup actually works
– you need to write and test regularly your schema migration scripts
– you need to make them “hands-off” so they can run as a cron job
These practices make life for the IT operations a lot easier and is good risk mitigation to make customers sleep better.
On big databases I do not think there are easy (or cheap!) methods.