In my previous article I talked about analyzing mysql database schema. After a while, I got few messages from people around asking me to elaborate things. So, in this article I will try to explain things in detail.
Follow my previous article to take the mysql database schema dump without any data. If you have full access and control of the database then I would suggest to take the mysqldump with data (just for the sake of better understanding). So, here is how you can take the database dump with data in all tables.
mysqldump -u UNAME -pYOURDBPASSWORD DBNAME > DBNAME.sql
UNAME -> mysql username
YOURDBPASSWORD -> mysql database password (No space after -p)
DBNAME -> mysql database name
With tools like mysql workbench, you can even connect your database right away. That’s one way of doing it. But I will not suggest it because there is always a chance of messing the original database.
So, once you have a original database dump, just create a local version of database by importing your database dump into your locate database and connect it to workbench. Once the connection is made, you can make reverse engineering to analyse full mysql database tables with diagrams.
Alternately you can also try an approach mentioned here on this page. I hope I explained things in detail, if you still have any questions or suggestions, please drop a comment. I will make sure to get back to you as soon as I can.