Frequently Asked Questions with answers.
220.127.116.11: Are these utilities present in the community version of MySQL?
18.104.22.168: Can the utilities be used with MyISAM or CSV?
22.214.171.124: Can the .frm reader read a .frm file without the associated data files?
126.96.36.199: Will the .frm reader modify my original .frm file?
188.8.131.52: What is diagnostic mode and why doesn't it produce the same output as the default mode?
184.108.40.206: If the diagnostic mode is only a best-effort compilation, why use it?
220.127.116.11: Why does the default mode require a server?
18.104.22.168: Can the .frm reader read any .frm file?
22.214.171.124: My .frm files are tucked away in a restricted folder. How do I get access to them to run the .frm reader without copying or modifying file privileges?
126.96.36.199: Will the default mode display a 100% accurate CREATE statement?
Questions and Answers
They are included in the community version of MySQL Workbench, and available from Launchpad.
Yes. There are no storage engine specific limitations in using the utilities. There are some features written specifically for InnoDB so those may not apply but in general no utility is storage engine specific. For example, the mysqldiskusage utility shows exact sizes for MyISAM and InnoDB files but uses estimated sizes for any other storage engine based on number of rows and row size.
Yes! The .frm reader was designed to read the contents of an .frm file without requiring the data files.
No, it does not modify the original .frm file in either default or diagnostic mode.
The diagnostic mode does not use a spawned server to read the .frm file. Instead, it attempts to read the contents of the file byte-by-byte and forms a best-effort approximation of the CREATE statement. Due to the many complexities of the server code, the diagnostic mode does not currently process all features of a table. Future revisions will improve the accuracy of the diagnostic mode.
The diagnostic mode is used to attempt to read corrupt or otherwise damaged .frm files. You would also use it if you had no access to a server installation on the local machine.
The default mode uses a server to create a temporary working copy of the server instance. It does not access the donor server in any way other than to execute the mysqld[.exe] process.
Although it can read most .frm files, there are known limits to which storage engines it can process correctly. Currently, tables with storage engines partition and performance_schema cannot be read. However, these .frm files can be read by the diagnostic mode,
You can use elevated privileges such as su or sudo to execute the .frm reader. You must use the --user option to specify a user to launch the spawned server, however. This will permit the .frm reader to read the original .frm file and copy it to the spawned server and access the copy without requiring additional privileges.
For most tables and all views, yes. However, there are at least two features that are not stored in the .frm file and therefore will not be included. These are autoincrement values and foreign keys. That being said, the CREATE statement produced will be syntactically correct.