Closed lhzmrl closed 2 years ago
some mysql config in my.cnf like this:
# For emoji support
[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
init_connect='SET NAMES utf8mb4'
also, i see some charset config, will it work if I change it?
// set connection charset
await execute(
'SET @@collation_connection=$_collation, @@character_set_client=utf8, @@character_set_connection=utf8, @@character_set_results=utf8',
);
You can try to change this code. Write me if it helps
You can try to change this code. Write me if it helps
Modification is effective, you can consider opening attributes
await execute(
'SET @@collation_connection=$_collation, @@character_set_client=utf8mb4, @@character_set_connection=utf8mb4, @@character_set_results=utf8mb4',
);
Fixed in 0.0.26
I am trying to get mysql to support emoji, but I get the above error when I insert data after configuring the server, is this because the client does not support it? Can you give me some suggestions? Thank you.
my client config like this: