Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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
share|improve this question
    
You can query the INFORMATION_SCHEMA database. –  ypercube Mar 25 '12 at 20:34
add comment

3 Answers

DISCLAIMER : I do not use phpmyadmin

From the mysql client, you can run

SHOW CREATE TABLE List\G
SHOW CREATE TABLE Campaign\G

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:

SHOW CREATE TABLE List;
SHOW CREATE TABLE Campaign;
share|improve this answer
add comment
  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

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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