1346
MariaDBerrorconfigurationhigh confidence
Unknown character set
Production Risk
Low — DDL or SET fails.
What this means
A column definition, SET NAMES, or CHARACTER SET clause specified a character set name that MySQL does not recognise.
Why it happens
- 1Typo in character set name
- 2Character set not compiled into this MySQL build
- 3Restoring a dump from a different MySQL variant with custom charsets
How to reproduce
trigger — this will error
trigger — this will error
CREATE TABLE t (name VARCHAR(100) CHARACTER SET nonexistent);
expected output
ERROR 1346 (42000): Unknown character set: 'nonexistent'
Fix 1
List available character sets
List available character sets
SHOW CHARACTER SET;
Why this works
Shows all installed character sets.
Fix 2
Use utf8mb4
Use utf8mb4
CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci
Why this works
Recommended default for full Unicode support.
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 1346 ER_UNKNOWN_CHARACTER_SET
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev