[mysql] Auto Generate Database Diagram MySQL

I'm tired of opening Dia and creating a database diagram at the beginning of every project. Is there a tool out there that will let me select specific tables and then create a database diagram for me based on a MySQL database? Preferably it would allow me to edit the diagram afterward since none of the foreign keys are set...

Here is what I am picturing diagram-wise (please excuse the horrible data design, I didn't design it. Let's focus on the diagram concept and not on the actual data it represents for this example ;) ):

diagram see full size diagram

This question is related to mysql database database-design diagram

The answer is


phpMyAdmin has what you are looking for (for many years now): It takes a small bit of configuration, but gives you additional benefits too: http://www.phpmyadmin.net/documentation/#pmadb


Visual Paradigm for UML 9.0

It's awesome I used to work with mysql bench but for big databases (something like more than 300 tables) won't work very well but visual paradigm reverse database works so much better


Here is a tool that generates relational diagrams from MySQL (on Windows at the moment). I have used it on a database with 400 tables. If the diagram is too big for a single diagram, it gets broken down into smaller ones. So you will probably end up with multiple diagrams and you can navigate between them by right clicking. It is all explained in the link below. The tool is free (as in free beer), the author uses it himself on consulting assignments, and lets other people use it. http://www.scmlite.com/Quick%20overview


This http://code.google.com/p/database-diagram/ will reverse engineer your database. Just do an export 'structure only' then paste the SQL into the tool.


On a Mac, SQLEditor will do what you want.


Try out Vertabelo!

It's an online database modeler that supports reverse enginnering.

Just create free of charge Vertabelo account, import an existing database into Vertabelo and voila - your database is in Vertabelo!

It supports following databases:

  • PostgreSQL,
  • MySQL,
  • Oracle,
  • IBM DB2,
  • HSQLDB,
  • MS SQL Server.

Try MySQL Maestro. Works great for me.


MySQL Workbench worked like a charm.

I just backed up database structure to SQL script and used it in "Create EER Model From SQL Script" of MWB 5.2.37 for Windows.


Try SchemaBank. They support reverse engineering too.


I've recently started using http://schemaspy.sourceforge.net/ . It uses GraphViz, and it strikes me as having a good balance between usability and simplicity.


The "Reverse Engineer Database" mode in Workbench is only part of the paid version, not the free one.


I believe DB Designer does something like that. And I think they even have a free version.

edit Never mind. Michael's link is much better.


In MySql Workbench (6.0) its possible generate one diagram based on tables created. For that you should access to the tools bar, press Model and forward Create Diagram from Catalog Objects and done!


Examples related to mysql

Implement specialization in ER diagram How to post query parameters with Axios? PHP with MySQL 8.0+ error: The server requested authentication method unknown to the client Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver' phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' is not supported How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Connection Java-MySql : Public Key Retrieval is not allowed How to grant all privileges to root user in MySQL 8.0 MySQL 8.0 - Client does not support authentication protocol requested by server; consider upgrading MySQL client

Examples related to database

Implement specialization in ER diagram phpMyAdmin - Error > Incorrect format parameter? Authentication plugin 'caching_sha2_password' cannot be loaded Room - Schema export directory is not provided to the annotation processor so we cannot export the schema SQL Query Where Date = Today Minus 7 Days MySQL Error: : 'Access denied for user 'root'@'localhost' SQL Server date format yyyymmdd How to create a foreign key in phpmyadmin WooCommerce: Finding the products in database TypeError: tuple indices must be integers, not str

Examples related to database-design

What are OLTP and OLAP. What is the difference between them? How to create a new schema/new user in Oracle Database 11g? What are the lengths of Location Coordinates, latitude and longitude? cannot connect to pc-name\SQLEXPRESS SQL ON DELETE CASCADE, Which Way Does the Deletion Occur? What are the best practices for using a GUID as a primary key, specifically regarding performance? "Prevent saving changes that require the table to be re-created" negative effects Difference between scaling horizontally and vertically for databases Using SQL LOADER in Oracle to import CSV file What is cardinality in Databases?

Examples related to diagram

Tools to generate database tables diagram with Postgresql? Tools for creating Class Diagrams UML class diagram enum What tool to use to draw file tree diagram What's the best way to generate a UML diagram from Python source code? Generate table relationship diagram from existing schema (SQL Server) How to generate UML diagrams (especially sequence diagrams) from Java code? What's the best UML diagramming tool? Auto Generate Database Diagram MySQL