469,626 Members | 885 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,626 developers. It's quick & easy.

How to print-out MySQL database structure?

Is there any way in MySQL Admin to generate a print-out that shows the
structure of a table in a database? I really don't like having to
document this info by hand writing it on pieces of paper.

Thanks
Aug 13 '05 #1
2 60711
Martin (ma**********@comcast.net) wrote:
: Is there any way in MySQL Admin to generate a print-out that shows the
: structure of a table in a database? I really don't like having to
: document this info by hand writing it on pieces of paper.

You can do this from the mysql command line program.

google: mysql show
mysql> show databases
mysql> show tables
mysql> show columns from TABLE_NAME

and of course

mysql> desc TABLE_NAME


--

This space not for rent.
Aug 13 '05 #2
Martin wrote:
Is there any way in MySQL Admin to generate a print-out that shows the
structure of a table in a database? I really don't like having to
document this info by hand writing it on pieces of paper.


You can use the mysqldump command-line tool that comes with MySQL.
For purposes of documenting the schema, I'd recommend a usage

mysqldump --no-data --skip-opt --skip-comments --compact
[--user and --password options] "databasename"

See http://dev.mysql.com/doc/mysql/en/mysqldump.html for details on this
tool and its options.

Another option is to get a graphical representation of the database.
There are tools that can connect to a database, analyze the schema, and
create an ERD (entity relationship diagram) for you. One software
product that can do this, which is free for use with MySQL, is
DB-Designer 4 (http://www.fabforce.net/dbdesigner4/). Read its docs for
the feature of Reverse Engineering.

Regards,
Bill K.
Aug 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by MouseHart | last post: by
6 posts views Thread by Andrew Chalk | last post: by
30 posts views Thread by Martin Bless | last post: by
6 posts views Thread by Ruchika | last post: by
12 posts views Thread by Michael Foord | last post: by
14 posts views Thread by Marcin Ciura | last post: by
reply views Thread by bearophileHUGS | last post: by
1 post views Thread by Steff | last post: by
69 posts views Thread by Edward K Ream | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.