Confirm that the character encoding and collation for the two tables is the same.
In my own case, one of the tables was using utf8
and the other was using latin1
.
I had another case where the encoding was the same but the collation different. One utf8_general_ci
the other utf8_unicode_ci
You can run this command to set the encoding and collation for a table.
ALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
I hope this helps someone.