Originally Posted by jjjjj
mysql> SHOW VARIABLES
-> WHERE Variable_name LIKE 'character\_set\_%'
-> OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8mb4_general_ci |
+--------------------------+--------------------+
10 rows in set (0.01 sec)

The database character_set_database and collation_database affect inserting data into the database; as you stated above your character_set_database value is utf8 and not utf8mb4. You're attempting to insert 4 bytes of data into a field that doesn't allow it, hence the error.