How to merge two databases, both with primary keys
I assume there is a UNIQUE index on the column with "Dave" and "Bob"?  Without that, how do you know what is "new"?

Let's call the column name (distinct from id).

Does some other table depend on Dave=5?  If so, the following will not suffice, and the solution is much messier.

Are there changes to the columns?  Or is it only "new" rows to be copied from A to B?

INSERT INTO B.user
    SELECT ...  -- excluding `id`
        FROM A.user
        LEFT JOIN B.user  USING(email)
        WHERE B.id IS NULL;     -- Not currently in B


To handle changes, look at INSERT ... ON DUPLICATE KEY UPDATE, again with a JOIN, but this time IS NOT NULL.