Suresh Kamrushi
Practical guide · MySQL and phpMyAdmin

How to Generate an ER Diagram with phpMyAdmin

Use phpMyAdmin's Designer to visualize table relationships and export a database schema as a PDF.

If you already manage a MySQL database in phpMyAdmin, its Designer can help you create an entity-relationship diagram (ERD) without opening a separate modeling tool. The Designer lays out tables and their relationships; phpMyAdmin can also save a layout as a PDF schema page for later export.

Open the database Designer

  1. Sign in to your phpMyAdmin installation and select the database you want to diagram.
  2. Open the database's More menu and choose Designer. Depending on your phpMyAdmin version and screen size, the menu label or location may differ.
  3. Arrange the tables in the Designer. Relationship lines are available when the database has defined relations and phpMyAdmin's configuration storage is set up as required by your installation.

Save a layout and export a PDF schema

  1. In the Designer, open the option for importing or exporting coordinates for a PDF schema, or the equivalent PDF-page/layout control in your version.
  2. Create a named page for the schema layout, then save the table positions.
  3. Return to the database's operations or PDF-schema page management area and open the saved page for editing or export.
  4. Select the saved page and use the PDF export option to generate the diagram.

phpMyAdmin's interface has changed across releases. If these labels do not match your installation, consult the documentation for your installed version and look for the Designer, PDF schema, and page/layout controls.

Check the relationships in the diagram

An ERD is only as informative as the schema metadata it displays. Foreign-key constraints and phpMyAdmin relation configuration can affect whether relationship lines appear. If the diagram shows tables but not the expected links, check the database constraints and the configuration-storage setup before relying on the export.

In short: Select the database, open More → Designer, arrange the tables, save a PDF schema layout, and export that saved page. Menu names vary by phpMyAdmin version.