如何确定mysql数据库的类型:是InnoDB还是MyISAM? [英] How can I determine type of mysql database : whether it is InnoDB or MyISAM?

查看:209
本文介绍了如何确定mysql数据库的类型:是InnoDB还是MyISAM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 如何确定mysql数据库的类型:是InnoDB还是MyISAM?
  • 如何将MyISAM转换为InnoDB,反之亦然?

推荐答案

要确定表正在使用的存储引擎,可以使用 information_schema.tables :

To determine the storage engine being used by a table, you can use show table status. The Engine field in the results will show the database engine for the table. Alternately, you can select the engine field from information_schema.tables:

select engine 
from   information_schema.tables 
where  table_schema = 'schema_name'
   and table_name = 'table_name' 

您可以使用 alter table :

You can change between storage engines using alter table:

alter table the_table engine = InnoDB;

当然,您可以在此处指定任何可用的存储引擎.

Where, of course, you can specify any available storage engine.

这篇关于如何确定mysql数据库的类型:是InnoDB还是MyISAM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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