I'm a very, very basic user of mysql.
I understand some aspects of 'mysqldump', and have successfully used it to load an existing database from one machine onto another machine, so that they currently hold identical instances of the database in question. The machines are in different locations.
My question is about subsequently keeping both instances up-to-date. I could work on Machine1, resulting in the database being changed. Then I think I would have to remove the exiting database from Machine2 (using 'drop...') and then load the up-to-date version from Machine1 in the form of a *.sql file.
Obviously, I'd have to keep doing this procedure once one of the versions had been changed, so that the other machine would have it in the same state. Quite a bit of this could be facilitated by the use of a script or scripts.
Is there an easier way of accomplishing this, and am I missing something obvious? For example, a common storage location for the relevant files, instead of /var/lib/mysql/[database name]?