How to Quickly Visualize/Analyze a MySQL Database?

October 25, 2009

Once in a while we been in situations where you need to quickly understand/analyze a database given to you by others.  We can go through each table and try to understand but it is usually lot simpler if you can visualize all the tables involved and relationships between those.  Enter SchemaSpy: a free tool to do that.    For sake of specifics, say the database given is MySQL and your pc is running some version of Windows.

A. Download and Install Pre-requsites (if you dont have already)

B. Download latest SchemaSpy Jar File  from http://sourceforge.net/projects/schemaspy/files/   (In my case it is schemaSpy_4.1.1.jar)  to a known location (using same C:\mydblayout)

Now run the schemaspy to generate report (html format) for database “mytestdb”  which is sitting at a local mySQL server.

C:\mydblayout>java -jar schemaSpy_4.1.1.jar -t mysql
 -dp mysql-connector-java-5.1.10\mysql-connector-java-5.1.10\mysql-connector-java-5.1.10-bin.jar
-db mysql -host localhost -u root -p mysecretpass -o mytestdb_report

See how -dp flag is used to point to jdbc driver.  The above command creates a folder called “mytestdb_report”  with all the nice html files.  Just open the “index.html” file.

For example output see http://schemaspy.sourceforge.net/unifieddb/characters/index.html

For more details, look at web page of  this wonderful SchemaSpy (http://schemaspy.sourceforge.net/) written by John Currier.

About these ads

19 Responses to “How to Quickly Visualize/Analyze a MySQL Database?”

  1. ircguru Says:

    Nice Post, btw do you know any good usenet archives and or mailing list archives site for unix / linux / bsd


  2. […] un commento Vai ai commenti visualizzare velocemente un database MySQL usando schemaspy. From: N Rao Lakkakula’s Blog. Continue reading. Categorie:Senza categoria Tag: Commenti (0) Trackbacks (0) Lascia un […]


  3. […] you can also try an approach mentioned here on this page. So, if you have any questions or suggestions, please drop a comment. I will make sure to get back […]

  4. Roseanne Says:

    I have read so many content concerning the blogger lovers but this piece of writing is in fact a fastidious piece of writing, keep it up.

  5. residential architect Says:

    Good blog post. I definitely love this website. Keep writing!


  6. Hi there i am kavin, its my first occasion
    to commenting anywhere, when i read this paragraph
    i thought i could also create comment due to this
    brilliant piece of writing.


  7. Hi there all, here every one is sharing such knowledge, thus it’s pleasant to read this webpage, and I used to pay a quick visit this website every day.


  8. Hey there I am so happy I found your weblog, I really found you by accident, while I was searching on
    Bing for something else, Anyways I am here now and would just like to say thanks a lot for a marvelous post
    and a all round interesting blog (I also love the theme/design), I don’t have time to browse it all at the minute
    but I have bookmarked it and also added your RSS feeds,
    so when I have time I will be back to read much more, Please do keep up the great b.


  9. Great blog! Is your theme custom made or did you
    download it from somewhere? A theme like yours with a few simple adjustements
    would really make my blog shine. Please let me know where you got your theme.
    Many thanks

  10. Stacy Says:

    Ok, enough said. This was probably the best article I have
    read on How to Quickly Visualize/Analyze a MySQL Database? | N Rao Lakkakula’s Blog today and I often do research daily on the subject of prado electronic cigarette. Thanks for sharing with the world. Cheers!


  11. I seldom leave remarks, but after reading through a few of the comments on this page How
    to Quickly Visualize/Analyze a MySQL Database? | N Rao Lakkakula’s Blog. I actually do have some questions for you if it’s
    okay. Could it be only me or do a few of these remarks appear like they
    are coming from brain dead folks? :-P And, if you are writing at other online sites,
    I’d like to follow you. Would you list of all of all your social community sites like your linkedin profile, Facebook page or twitter feed?


  12. hey there and thank you for your information – I’ve certainly picked up anything new from right here. I did however expertise a few technical points using this web site, since I experienced to reload the website many times previous to I could get it to load correctly. I had been wondering if your web hosting is OK? Not that I’m complaining, but sluggish loading instances times will sometimes affect your placement in
    google and could damage your high quality score if ads and marketing
    with Adwords. Anyway I am adding this RSS to my e-mail and could look out for much more of your respective intriguing content.
    Make sure you update this again very soon.

  13. help.vth.ru Says:

    Yes! Finally someone writes about best seo professional.


  14. Hey! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My site looks weird when browsing from my iphone. I’m
    trying to find a theme or plugin that might be able to correct this issue.
    If you have any suggestions, please share. Many thanks!

  15. pet turtles Says:

    An attention-grabbing dialogue is value comment. I believe that you
    need to write more using this topic, it won’t manifest like a taboo subject however typically folks are not sufficient to talk on such topics. Just one more. Cheers


  16. Hey just wanted to give you a quick heads up.
    The text in your post seem to be running off the screen in Ie.
    I’m not sure if this is a formatting issue or something to do with web browser compatibility but I thought I’d post to
    let you know. The layout look great though! Hope you get
    the issue resolved soon. Kudos


  17. Excellent read! I’ve added your rss feeds to my Google account.


  18. Hi there to all, how is all, I think every one is getting more from
    this web page, and your views are pleasant in favor of new visitors.

  19. Alex Says:

    Hi there it’s me, I amm ɑlso visiting thiks site oon
    ɑ regular basis, thiis weeb paage іs actjally ɡood anԁ the vistors ɑге іn fɑct sharing
    pleasant thοughts.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: