mysqldump to ER Diagram
Paste the whole mysqldump file — INSERT rows, LOCK TABLES, conditional comments and session SETs are stripped; only the schema survives.
Your diagram renders here.
What we parse in mysql
- Full dumps welcome — INSERT rows never reach the diagram, schema only
- Conditional comments — /*!40101 SET … */ session noise dropped
- LOCK TABLES / UNLOCK TABLES — dropped, along with the SET preamble
- KEY / UNIQUE KEY index lines — ignored; CONSTRAINT … FOREIGN KEY clauses become edges
Get just the schema
mysqldump dbname > dump.sql
No -d needed — paste the file with its data and the diagram still shows only the schema. mysqldump -d keeps files smaller, but either output works.
Questions, answered
Can I paste a full mysqldump file with the data in it?
Yes — that's what this page is for. INSERT rows, LOCK TABLES blocks and the /*! SET … */ preamble are stripped automatically; only CREATE TABLE statements and their keys survive into the diagram.
What does mysqldump -d do — do I need it?
-d (--no-data) exports structure only, which keeps the file small. Useful, but not required here: the parser reads the full dump exactly the same.
How do I turn an existing dump.sql into a diagram?
Open dump.sql in any text editor, select all, paste it above. The parse runs on the text you paste — your MySQL server is never contacted.
Will the diagram include the AUTO_INCREMENT counters?
No — table options like ENGINE, CHARSET and AUTO_INCREMENT=n are noise and are dropped; columns, types, keys and relationships are what's drawn.