如何检查MySQL表是否为UTF-8并具有storageEngine InnoDB? [英] How to check if MySQL table is UTF-8 and has storageEngine InnoDB?

查看:113
本文介绍了如何检查MySQL表是否为UTF-8并具有storageEngine InnoDB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

谷歌搜索只是找到了从一种格式更改为另一种格式的说明,但是我似乎找不到确切的方法来确定首先要使用哪种格式.

Googling around just finds instructions for changing from one format to another, but I can't seem to find how exactly to make sure which of these I have first.

我该怎么办

  1. 检查表中编码的字符是什么?
  2. 检查表使用什么存储引擎?
  3. 检查所有表是否都使用某种编码?
  4. 检查所有表是否都具有特定的存储引擎?

推荐答案

您可以使用information_schema来了解每个表的引擎.

You can use information_schema in order to know the engine of each table.

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表是否为UTF-8并具有storageEngine InnoDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆