I’m developing a website. I have a remote and local copy, and I develop on the local copy, and then when I’ve got a stable version I copy up all the PHP files and then I have to make the remote live MySQL database look like my local one.
I typically delete the remote, live database (as long as I’m not deleting new changes) and re-import it from a .sql file using PHPMyAdmin.
I want to set up a more reliable, correct, and idiot-proof, version updating system for my database. Is MySQL server replication the right answer? How is this usually done?
No, you never want a development/test environment replicating to a live database. If you accidentally dropped a table, you’d wipe out the live site.
Better to use something like http://www.mysqldiff.org/