Is there any way to generate a report of my database structure using phpMyAdmin? What I would like is a table format like the following, and an Entity Relationship table.

Table name: List
Description: Subscriber list information 

Field           Type        Null        Description
ListID          Int         N   
ListName        Varchar     N   
ListFromName    Varchar     N           Default person represent for the mail
ListReplyTo     Varchar     N           Default return address
ListSubject     Varchar     N           Default subject title of mail
ListRemindSub   Int         N           Whether notify when people subscribe
ListRemindUnSub Int         N           Whether notify when people unsubscribe
ListCreateDate  Date        N   

Table name: Campaign
Description: Mail campaign information

Field           Type        Null        Description
CampID          Int         N   
CampReplyTo     Varchar     N           Specific return mail
CampFromName    Varchar     N           The person represent for the mail
CampSubject     Varchar     N           Subject title of mail
CampFb          Int         N           Whether include Facebook reminder
CampGA          Int         N           Whether include Google Analytic

5 Answers 5


select DB, go to export, select tables that you want the structure (top left),deselect "DATA"(middle-center) and select a name and you will be able to export only the structure.

enter image description here

or go to your "database" then "check all" (just below the tables) and change the option from "With Selected:" to "print view". it will show the relations too, and it will looks like this:enter image description here


DISCLAIMER : I do not use phpmyadmin

From the mysql client, you can run


It will show the table structure and associated indexes

In phpmyadmin, there is a Structures Tab to view the Table Columns

To run the SHOW CREATE TABLE commands I mentioned above, try executing them in the SQL or Query Tab. If phpmyadmin does not like my command line versions of the SHOW CREATE TABLE ... \G commands, then run them in the SQL or Query Tab with semicolons:

  • You can also run this in phpmyadmin by first selecting the database, and then clicking the SQL tab. That's a bit easier than exporting the db while unselecting the data section
    – yitwail
    Commented Nov 9, 2014 at 19:50
  1. You can get that information from PHPMyAdmin by clicking the "Data Dictionary" link at the bottom of the list of tables in the database.

  2. I thought that PHPMyadmin would create an ERD or database documentation, but I cannot seem to find the link. However you can use MySQL workbench (http://www.mysql.com/products/workbench/) to generate an ERD by connecting to your database or from an SQL file export

  • I never noticed the Data Dictionary link. It saved me a lot of time! Commented Dec 12, 2016 at 2:20

The print view of phpmyadmin is pretty good. Go to the "structure" tab..

the structure tab for a table in phpmyadmin

Then go to bottom and find the "print" link... you will be rewarded with a lovely view like this:

enter image description here

this has most of what you want... Your report was very text oriented and you might be looking at more like an ascii-art type output, and so I am not sure if you want this level of pretty printing or not. But if you want something that just prints well-enough, and does not take time to get to, this works pretty well.


What I would like is a table format like the following, and an Entity Relationship table.

You can generate a entity relationship diagram and table structures from an existing database and tables.

  • From phpMyAdmin - Select the database from the left-side panel (see picture below).
  • Then, on the top panel (or TAB), select the More -> Designer. This opens the Designer panel, generates and shows the diagram with the tables in the database and their relationships. Further, you can edit this diagram.

The following is the Designer panel (using phpMyAdmin 5.2.1 connecting to MySQL 8) with an example of orders and order_detail tables:

enter image description here

The Designer panel has an option, Export Schema. This generates a PDF document with the diagram and the table structures. The PDF report with table structures (the actual report had four pages - list of tables, each table with its structure and the diagram):

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.