MySQL throws ER_UNKNOWN_CHARACTER_SET (error 1115) when a client or server-side statement references a character set that the server does not recognize or support.
MySQL Error 1115: ER_UNKNOWN_CHARACTER_SET appears when a query, column, or connection requests an unknown character set. Verify the spelling, install missing character sets, or switch to a supported one to resolve the problem quickly.
Unknown character set: '%s'
Error 1115 is raised when MySQL cannot map the supplied character set name to any character set compiled into the server. The message is returned immediately and the statement stops executing.
The failure can trigger during server startup, client connection negotiation, DDL, or DML that declares an unsupported encoding.
The error surfaces in CREATE DATABASE, CREATE TABLE, ALTER TABLE, SET NAMES, and connection strings that specify an invalid or absent character set plugin.
It is common after migrations from other databases or when restoring dumps generated on servers with custom encodings.
Leaving the error unresolved blocks schema creation, data import, and can break application startups. Fixing it ensures consistent text storage, prevents data corruption, and restores application availability.
Incorrect charset spelling, unavailable character set plugins, mismatched client-server versions, or removed encodings in newer MySQL releases typically trigger Error 1115.
Server misconfiguration, such as commenting out a dynamic plugin directory, can also remove access to character sets added at runtime.
First, confirm the exact character set requested in the error message. Cross check with SHOW CHARACTER SET to see if it exists.
If missing, either install the plugin, recompile MySQL with the charset, or alter the statement to use a supported set like utf8mb4.
Restoring dumps: Replace unsupported charset declarations in the dump file before import.
Client libraries: Upgrade connectors so that client and server share charset tables.
Standardize on utf8mb4 across schemas, validate dumps in CI, and monitor the INFORMATION_SCHEMA.CHARACTER_SETS table for unexpected removals.
Error 2019 (HY000): Cannot initialize character set. Occurs when charset exists but tables are corrupt.
Error 1118: Row size too large. Appears when converting to utf8mb4 without adjusting row format.
Typos like utf8mb44 or latin1s appear frequently in manual DDL and migration scripts, leading MySQL to flag the name as unknown.
Upgrading from MySQL 5.x to 8.0 removes obsolete encodings such as ucs2 if they were not compiled into the new binary.
Character sets added via dynamic plugins fail when the --plugin-dir path is wrong or the .so file is missing at startup.
Old connectors request charsets that the newer server was built without, triggering the error during the handshake.
.
Run SHOW CHARACTER SET or query INFORMATION_SCHEMA.CHARACTER_SETS to list every compiled or dynamically loaded encoding.
Yes. Write a character set plugin, place the shared library in the plugin directory, and execute INSTALL PLUGIN.
No data is altered until you ALTER TABLE or column definitions. Test conversions on staging to confirm row sizes.
Galaxy's editor highlights invalid charsets in real time and offers AI fixes, ensuring queries use supported encodings before execution.