简体   繁体   English

如何确定文件系统中MySQL数据库的引擎是MyISAM还是InnoDB?

[英]How I can find out if the engine of a MySQL database is MyISAM or InnoDB in file system?

How I can find out the MySQL database engine in the file system (data structure, no MySQL commands possible)? 如何找到文件系统中的MySQL数据库引擎(数据结构,没有MySQL命令)?

It would be nice if you can help me. 如果您能帮助我,那就太好了。

Best regards, Jonniboy 最好的问候,Jonniboy

MySQL ".frm" (table) files have a file signature and a defined header format. MySQL“ .frm”(表)文件具有文件签名和已定义的标头格式。

This format is briefly explained in 8 bits: MySQL File formats and headers : 此格式用8位简要说明:MySQL文件格式和标头

  1. The first two bytes are always FE,01 前两个字节始终为FE,01
  2. The 4th byte is the storage type: eg 0C for InnoDB, 09 for MyISAM, 14 for MyIASM w/ partitions. 第四个字节是存储类型:例如,对于InnoDB, 0C ;对于MyISAM, 09对于具有分区的MyIASM, 14 (See Bill Karwin's comment; these are extracted from the legacy_db_type enum.) (请参阅Bill Karwin的评论;这些摘录自legacy_db_type枚举。)

That should be all the information required to perform a cursory check - either with file (which may or may not need additional rules) or by manual inspection with something like xxd , eg 那应该是执行粗略检查所需的所有信息-使用file (可能需要也可能不需要其他规则),或者使用xxd的手动检查,例如

sh$ xxd -l 4 table.frm

Keep in mind that a single database may contain MyISAM and InnoDB tables. 请记住,单个数据库可能包含MyISAM InnoDB表。

SHOW ENGINES is the syntax SHOW ENGINES是语法

http://dev.mysql.com/doc/refman/5.0/en/show-engines.html for more info http://dev.mysql.com/doc/refman/5.0/en/show-engines.html了解更多信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我如何确定mysql数据库的类型:是InnoDB还是MyISAM? - How can I determine type of mysql database : whether it is InnoDB or MyISAM? 我可以在MySQL数据库上将某些表与InnoDB引擎一起使用,并将某些表与MyIsam一起使用吗? - Can i use some tables with InnoDB engine and some with MyIsam on my MySQL database? MySql - 将InnoDB转换为数据库的MyISAM存储引擎 - MySql - Convert InnoDB to MyISAM Storage Engine of Database 我怎么知道mysql表是使用myISAM还是InnoDB引擎? - How do I know if a mysql table is using myISAM or InnoDB Engine? 如何确定我在Linux,MyISAM和InnoDB中使用的是哪种类型的mysql? - How to find out if which type of mysql I am using in Linux, MyISAM and InnoDB ? MySQL数据库引擎:MyISAM用于information_schema,而InnoDB用于其他数据库 - MySQL database engine: MyISAM for information_schema but InnoDB for other databases 为什么使用MyISAM引擎而不是InnoDB创建默认的'mysql'数据库? - Why default 'mysql' database created using MyISAM engine instead of InnoDB? 如果我将 mysql 引擎从 Myisam 更改为 innodb,是否会影响我的数据 - If i change mysql engine from Myisam to innodb, will it affect on my data 如果引擎是InnoDB / MYISAM,我们可以在mysql表中添加几列? - how many columns we can add in mysql table if engine is InnoDB/MYISAM? mysql数据库innodb myisam性能 - mysql database innodb myisam performance
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM