I am trying to move some data from MSSQL to MySQL. When I'm running wbcopytables.exe
the charset on mysql connection seems to be wrong, I'm getting an error when the data contain emoji icons (http://apps.timwhitlock.info/unicode/inspect?s=%F0%9F%8C%A8%E2%98%83%EF%B8%8F):
Incorrect string value: '\xF0\x9F\x8C\xA8\xE2\x98...' for column 'Value' at row 4
My server, database, table and column have charset=utf8mb4
and collation=utf8mb4_unicode_ci
. However I can insert those emoji icons to that table with a .NET application I created on the side, so it is not a matter of schema/server settings. This makes me think wbcopytables.exe
is enforcing some other encoding (possibly utf8) on the connection. I tried changing all mysql variables to enforce utf8mb4 as suggested in other SO questions with these in my.ini:
[mysqld]
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
init_connect='SET collation_connection = utf8mb4_unicode_ci'
skip-character-set-client-handshake
EDIT: Here is more information about the wbcopytables.exe itself: https://dev.mysql.com/doc/workbench/en/wbcopytables.html