四处搜索只能找到从一种格式更改为另一种格式的说明,但我似乎无法找到确切的方法来确定我首先拥有哪些。
我该怎么做:
- 检查表有什么字符编码?
- 检查表使用什么存储引擎?
- 检查所有表是否都是某种编码?
- 检查所有表是否都有特定的存储引擎?
最佳答案
您可以使用 information_schema 来了解每个表的引擎。
select table_name,engine
from information_schema.tables
where table_schema = 'your_database'
对于你可以使用的编码
show create table table_name
或者,甚至更好
select
c.character_set_name
from information_schema.tables as t,
information_schema.collation_character_set_applicability as c
where c.collation_name = t.table_collation
and t.table_schema = "your_db"
and t.table_name = "table_name";
关于mysql - 如何检查 MySQL 表是否为 UTF-8 且具有 storageEngine InnoDB?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6103595/