How do I see what character set a MySQL database / table / column is?

前端 未结 15 1459
失恋的感觉
失恋的感觉 2020-11-22 06:33

What is the (default) charset for:

  • MySQL database

  • MySQL table

  • MySQL column

15条回答
  •  花落未央
    2020-11-22 07:12

    For databases:

    USE your_database_name;
    show variables like "character_set_database";
    -- or:
    -- show variables like "collation_database";
    

    Cf. this page. And check out the MySQL manual

提交回复
热议问题