Asked 7 years ago
4 Apr 2017
Views 1432
jessica

jessica posted

Unknown character set: 'utf8mb4' in MySQL

SQL query:

SET NAMES utf8mb4;



MySQL give error :

#1115 - Unknown character set: 'utf8mb4'
kord

kord
answered Jun 24 '23 00:00

The error message " Unknown character set: 'utf8mb4' " suggests that your MySQL server does not support the 'utf8mb4' character set. This character set is required to handle certain Unicode characters, including emojis.

To resolve this issue, you can try the following steps:

Verify MySQL Version :
Ensure that you are using MySQL version 5.5.3 or higher. The 'utf8mb4' character set was introduced in MySQL 5.5.3.

Check MySQL Server Configuration :
Verify that your MySQL server is properly configured to support the 'utf8mb4' character set. Open the MySQL configuration file (my.cnf or my.ini) and make sure the following settings are present:


[client]
default-character-set = utf8mb4

[mysql]
default-character-set = utf8mb4

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
Save the configuration file and restart the MySQL server for the changes to take effect.

Update MySQL Server Version :
If you are using an older version of MySQL that does not support 'utf8mb4', consider upgrading to a newer version that does.
Post Answer