Steps to Install SchemaSpy 5.0 on Ubuntu 11.10

Step 1: Download dependencies :
1) Graphviz – Instructions Here
2) ConnectorJ              –  Instructions Here
3) Java – JDK, JRE      –  Instructions Here

Step 2: Download SchemaSpy 5.0

wget “http://sourceforge.net/projects/schemaspy/files/schemaspy/SchemaSpy%205.0.0/schemaSpy_5.0.0.jar/download” -O schemaSpy_5.0.0.jar

Step 3: Run schemaSpy


$ java -jar schemaSpy_5.0.0.jar

-t mysql  -o output_folder

-host localhost

-db DB_Name

-u USER

-p PASSWORD

-dp Connector-J/mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar

 

/mysql-connector-java-5.0.8/mysql-connector-java-5.0.8-bin.jar
Using database properties:
  [schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/mysql.properties
Gathering schema details.....................................(7sec)
Writing/graphing summary............(1sec)
Writing/diagramming details..................................(1sec)
Wrote relationship details of 34 tables/views to directory
'output_folder' in 10 seconds.
View the results by opening output_folder/index.html
Step 4: Create a symlink in www directory
cd /var/www
sudo ln -s /path/to/output_folder DB_Name

Remember apache must be able to follow symlinks and must have atleast read+execute perms.

Step 5: Point your browser to : localhost/DB_Name

…and you should see what you DB looks like schema wise.


References:

SOLVED: Failed to load driver ‘com.mysql.jdbc.Driver’

Easy way to solve this error is to download ConnectorJ.

1) Step 1: wget –spider “http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.0.8.zip/from/http://mysql.he.net/”

2) Step 2: unzip mysql-connector-java-5.0.8.zip

3) Step 3: Add it to your includes

References:

i) http://dev.mysql.com/doc/refman/5.1/en/connector-j.html