Come faccio a vedere che set di caratteri ha un database MySQL / tabella / colonna?

Qual è il charset (predefinito) per:

  • Database MySQL

  • Tabella MySQL

  • Colonna MySQL

Per le tabelle:

SHOW TABLE STATUS elencherà tutte le tabelle.

Filtrare usando:

SHOW TABLE STATUS where name like 'table_123';
Commentari (2)

Io guardo sempre solo SHOW CREATE TABLE mydatabase.mytable.

Per il database, sembra che tu debba guardare SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA.

Commentari (3)

Per tabelle e colonne:

show create table your_table_name
Commentari (2)