avatar

ShinChven's Blog

Nodejs Store Emoji in MySQL

nodejs, mysql, emoji2021-12-30 02:08:50

Everything should be set to utf8mb4

NodeJS MySQL Connection Pool Charset

{
  "charset": "utf8mb4"
}

MySQL Table Character Set

CREATE DATABASE IF NOT EXISTS `<database_name>` CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;