4097
MySQLWARNINGCriticalHIGH confidence

utf8 character set alias is deprecated

Production Risk

Low — Functionality is preserved via the alias, but future versions will remove it.

Why it happens
  1. 1A column, table, or database was created or altered using CHARACTER SET utf8.
  2. 2A connection character set was set to utf8.

Fix 1

Migrate to utf8mb4

Migrate to utf8mb4
ALTER TABLE t CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Why this works

Converts all string columns to utf8mb4, which is the recommended character set.

Fix 2

Update application connection settings

Why this works

Change charset=utf8 to charset=utf8mb4 in connection strings.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 4097 ER_WARN_DEPRECATED_UTF8_ALIAS

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors