[英]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文件格式和标头 :
FE,01
FE,01
0C
for InnoDB, 09
for MyISAM, 14
for MyIASM w/ partitions. 0C
;对于MyISAM, 09
对于具有分区的MyIASM, 14
。 (See Bill Karwin's comment; these are extracted from the legacy_db_type
enum.) 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.