Skip to main content

Documentation Index

Fetch the complete documentation index at: https://planetscale.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

What this error means

INVALID_CHARSET means a table or column uses a character set that PlanetScale does not allow for schema linting. Common messages include:
table "users" has an invalid table charset utf16: only utf8, utf8mb4, and utf8mb3 charsets are supported.
table "users" has an invalid column charset utf16: only utf8, utf8mb4, and utf8mb3 charsets are supported.
PlanetScale supports utf8mb4, utf8mb3, utf8, latin1, and ascii. We recommend utf8mb4 for new schemas.

Why PlanetScale rejects it

Vitess must be able to parse, compare, and apply schemas consistently across branches and tablets. Unsupported charsets can make schema diffs and data movement unsafe or incompatible with the target MySQL configuration.

How to fix it

Convert the table or column to a supported character set, preferably utf8mb4.
ALTER TABLE users CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
For a single column override, update the column definition:
ALTER TABLE users
  MODIFY display_name varchar(255)
  CHARACTER SET utf8mb4
  COLLATE utf8mb4_0900_ai_ci
  NOT NULL;
If the table contains existing data, test the conversion on a development branch first and confirm your application handles the new collation rules.

Need help?

Get help from the PlanetScale Support team, or join our Discord community to see how others are using PlanetScale.