簡體   English   中英

如何檢查 MySQL 表是否為 UTF-8 並且有 storageEngine InnoDB?

[英]How to check if MySQL table is UTF-8 and has storageEngine InnoDB?

谷歌搜索只是找到從一種格式更改為另一種格式的說明,但我似乎無法找到如何確切地確定我首先擁有哪些。

我怎樣才能:

  1. 檢查表有什么字符編碼?
  2. 檢查表使用什么存儲引擎?
  3. 檢查所有表是否都是某種編碼?
  4. 檢查所有表是否都有特定的存儲引擎?

您可以使用 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";

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM