Create a Database Diagram in MySQL Workbench

Create a Database Diagram in MySQL Workbench

It is helpful to have a visual representation when designing a database. MySQL Workbench allows you to create entity relationship diagrams (ERDs) with relationships between the tables (one to one, one to many) and rearrange them as needed. Below we cover how to create an ERD from a downloaded SQL file.

Create a Diagram from a SQL File

  1. If using a database on your server, download the SQL file using cPanel Backup Wizard or phpMyAdmin.
  2. Download MySQL Workbench for free at and install it on your local machine.
  3. Open MySQL Workbench.
  4. Select File and New Model from the top menu.
    Create a new model in MySQL Workbench
  5. Select File, hover over Import, and press Reverse Engineer MySQL Create Script….
    Reverse engineer a MySQL file
  6. Specify the SQL file needing a diagram. Press Execute, Next, and then Finish.
    Select a file in MySQL Workbench
    Finish in MySQL Workbench
  7. At this point, you can rearrange and connect tables using the options on the left.
    ERD in MySQL Workbench
  8. Once you’re done editing, you can export the diagram as PNG, SVG, PDF, or postscript file.
    Export images in MySQL Workbench
  9. View the exported image to check results.
    Saved ERD in MySQL Workbench

To create a diagram for a database directly from cPanel, you’ll need to connect MySQL Remote Workbench to your server and ensure port 3306 is open.

InMotion Hosting Contributor
InMotion Hosting Contributor Content Writer

InMotion Hosting contributors are highly knowledgeable individuals who create relevant content on new trends and troubleshooting techniques to help you achieve your online goals!

More Articles by InMotion Hosting

One thought on “Create a Database Diagram in MySQL Workbench

Was this article helpful? Join the conversation!

Leap into Savings
Leap Ahead with Limited Time Deals