JAEN

SQL

文字コード確認・変更

CautionDatabase character sets

SHOW VARIABLES LIKE 'character_set%';

Checks charsets at every layer — mojibake and emoji errors end when everything agrees on utf8mb4.

Examples

  • ALTER TABLE posts CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_ja_0900_as_cs;Convert to utf8mb4

Syntax

SHOW VARIABLES LIKE 'character%'; / ALTER TABLE t CONVERT TO CHARACTER SET utf8mb4;

Before you run it

Conversions rebuild; back up first.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store