'Character set "utf8mb4" error between migration from mysql 5.7 (ubuntu 16.04 LTS) to mysql 8.0 (Ubuntu 20.04 LTS)

I am having some problems I can't figure out. I have a database "DatabaseA" on mysql 5.7 (server A), which I would like to migrate to "DatabaseA" on myql 8.0 (server B). Server A is running on Ubuntu 16.04 LTS and Server B is running on Ubuntu 20.04 LTS.

I see that there are some changes between the updates, and I am not sure what I am doing wrong during this migration/upgrade.

Server A: mysqldump --routines --databases DatabaseA --default-character-set=utf8mb4 > DatabaseA.sql

Server B: mysql --default-character-set=uft8mb4 -f < DatabaseA.sql > db_error.log 2>&1

Errors I am getting is on Server B are:

mysql: Character set 'uft8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file ERROR 2019 (HY000): Can't initialize character set uft8mb4 (path: /usr/share/mysql/charsets/)

Typically messages are also: "contains an invalid utf8mb3 character string: '\xF8ya'."

All help is appreciated! :)

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source