I have a dev server with a copy of the database that can be edited, and a real real server with the same database in a different state. To move the database from dev to live, I start from the dev server:
mysqldump -u root -p --opt db_name tbl_name | mysql -u user_name -p --host=live_IP -C db_name
With corresponding values ββin db_name, tbl_name, user_name and live_IP. However, this currently disables the table on the real server and copies the dev version on top of it, effectively overwriting everything and destroying any new data in the living table. What I really want is to have new lines in the dev server, and conflicting lines come from the copy of the development server, but any new lines in the live copy of the server remain unchanged. This is something like a merger, and I could not find a mention of something like this in the documentation, but it seems that this should be possible, since this is a common need.
source share