ErdDocs

MySQL data dictionary generator

Paste mysqldump --no-data output and get a data dictionary: every table, column, type, default, index and relationship as one printable document, with the inline COMMENT texts as descriptions. It is parsed in your browser, and the schema is never uploaded.

Your schema

The example is a MySQL support-desk schema; its COMMENT clauses fill the Description column. The messages table declares no foreign keys, so watch its relations arrive dashed, matched by name.

From a MySQL server to a document

  1. 01Run mysqldump --no-data mydb > schema.sql for the structure only, no rows. From Workbench: Server → Data Export → Dump Structure Only.
  2. 02Paste the file above or drop it onto the panel.
  3. 03Read the dictionary, then Save as PDF. The browser’s print dialog makes the PDF.

MySQL specifics the parser knows

  • Inline comments, both levels. COMMENT 'text' on columns and COMMENT='text' in table options become descriptions. Quotes and '' escapes are handled.
  • The dialect’s furniture. Backtick identifiers, unsigned, AUTO_INCREMENT, ENGINE= options, KEY /UNIQUE KEY index clauses. Gaps in the standard grammar are patched from real dumps too (Dolibarr’s REAL columns, PrestaShop’s named inline primary keys).
  • Schemas without foreign keys. This is the MyISAM legacy, and WordPress declares zero FKs across its whole schema. Relationships are inferred from column naming, drawn dashed, and counted separately.

FAQ

Is this the same thing as the MySQL 8 data dictionary?

No. MySQL 8 replaced its .frm files with an internal, transactional data dictionary that stores table metadata for the server itself. ErdDocs generates the other kind: a human-readable reference document of your schema for teammates, auditors and clients. The internal dictionary feeds the server. The one ErdDocs writes is the one you print, hand over and keep.

How do I export a MySQL schema for the dictionary?

mysqldump --no-data mydb > schema.sql dumps structure without rows. Add --routines if you keep procedures. In MySQL Workbench, use Server → Data Export → Dump Structure Only. Paste the result above, and everything is parsed in the browser.

Where do the descriptions come from in MySQL?

MySQL keeps them inline: COMMENT 'text' after a column definition and COMMENT='text' among the table options. mysqldump preserves both, and they become the Description column of the dictionary. ALTER TABLE ... COMMENT works too, since the comment lands in the next dump either way.

My MySQL dump declares no foreign keys. Will relationships be missing?

ErdDocs recovers them from column naming instead. A user_id column links to the users table, so the diagram stays connected. It is a common case: MyISAM never enforced foreign keys, and WordPress-style schemas declare none to this day. Recovered links are drawn dashed on the diagram and marked "matched by name" in the dictionary, so declared keys and inferred ones are never confused.

What does it cost?

Diagrams up to 25 tables and the dictionary preview are free, no account. One $9 payment unlocks the full dictionary and diagram for schemas of any size. You pay once, not monthly.

Related