As you can see from these configuration differences, the MySQL server is configured with latin1, while the MariaDB server is using utf8mb4:

Variable                  MySQL Server       MariaDB Server
========================= ================== ===================
character_set_client      latin1             utf8mb4
character_set_connection  latin1             utf8mb4
character_set_database    latin1             utf8mb4
character_set_results     latin1             utf8mb4
character_set_server      latin1             utf8mb4
collation_connection      latin1_swedish_ci  utf8mb4_general_ci
collation_database        latin1_swedish_ci  utf8mb4_general_ci
collation_server          latin1_swedish_ci  utf8mb4_general_ci

UTF8 is the preferred character set, but am I going to run into issues when loading data from one database to the other? Are there steps I should take? Change configurations?

MySQL Dump command:

mysqldump --routines --single-transaction --quick --skip-extended-insert

Here are the directives from the MySQL Dump file:

/*!40101 SET NAMES utf8 */;
/*!40103 SET TIME_ZONE='+00:00' */;
  • See what the dump says -- it may be explicit enough to deal with the issue. – Rick James Feb 24 '17 at 6:05
  • @RickJames - I've updated the post. Will those directives ensure everything works as it should? – Sonny Feb 24 '17 at 15:11
  • The SET NAMES utf8 says that the file is encoded utf8, not latin1. But, that could be OK. What parameters were used on mysqldump? – Rick James Feb 24 '17 at 19:56
  • The difference between utf8 and utf8mb4 is only in Emoji and Chinese (and some more obscure stuff); none of that is expressible in latin1. That is, I don't see utf8 versus utf8mb4 being a problem in this case. – Rick James Feb 24 '17 at 19:57
  • @RickJames - I've added the mysqldump command with arguments to the post. – Sonny Feb 24 '17 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.