How to merge local and live databases?

If you just merge the local DB into the production DB it actually means that your local install is a production as well. The problem is not with the ability to perform merge, the problem is that you don’t have a separation between production staging and dev servers.

DB on dev installs are likely to contain garbage values of some sort and you might get unexpected results if you just “merge”.

Your software design should avoid DB settings unless they actually should be used by a user. Avoid “development by DB values” tools like ACF, override and hardcode the values stored in options that the user will not change but you need to set for the configuration if it is a bought theme.

Once there is no setting in the DB which you use to control the behavior of the site the whole merge problem disappears.