문제

How I can find out the MySQL database engine in the file system (data structure, no MySQL commands possible)?

It would be nice if you can help me.

Best regards, Jonniboy

도움이 되었습니까?

해결책

MySQL ".frm" (table) files have a file signature and a defined header format.

This format is briefly explained in 8 bits: MySQL File formats and headers:

  1. The first two bytes are always FE,01
  2. The 4th byte is the storage type: e.g. 0C for InnoDB, 09 for MyISAM, 14 for MyIASM w/ partitions. (See Bill Karwin's comment; these are extracted from the legacy_db_type enum.)

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, e.g.

sh$ xxd -l 4 table.frm

Keep in mind that a single database may contain MyISAM and InnoDB tables.

다른 팁

SHOW ENGINES is the syntax

http://dev.mysql.com/doc/refman/5.0/en/show-engines.html for more info

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top