yano3nora
8/4/2017 - 5:42 PM

[dev: schemaspy] #db #sql #mysql

[dev: schemaspy] #db #sql #mysql

GitHub / Official

Refs

http://qiita.com/murachi1208/items/6af69c622eeca11408b3

Manual Operation

# Premise: Java 8 already installed
$  yum install graphviz-2.38.* graphviz-gd-2.38.* graphviz-dev el-2.38.* graphviz-graphs-2.38.*
$ sudo su
$ cd ~
$ wget https://github.com/schemaspy/schemaspy/releases/download/v6.0.0-rc1/schemaspy-6.0.0-rc1.jar
$ wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.43.tar.gz
$ tar zxvf mysql-connector-java-5.1.43.tar.gz
$ cp mysql-connector-java-5.1.43/mysql-connector-java-5.1.43-bin.jar .
$ cd /path/to/project
$ mkdir schemaspy
$ cd schemaspy
# Prepare config.file 
$ vi config.file
# Run schemaspy jar
$ java -jar /root/schemaspy-6.0.0-rc1.jar -configFile schemaspy.conf
# type of database.
schemaspy.t=mysql

# optional path to alternative jdbc drivers.
schemaspy.dp=/root/mysql-connector-java-5.1.43-bin.jar

# database properties.
schemaspy.host=localhost
schemaspy.port=3306
schemaspy.db=app
schemaspy.u=app
schemaspy.p=PASSWORD

# output dir to save generated files
schemaspy.o=/var/www/html/schemaspy

# db scheme for which generate diagrams
schemaspy.s=dbo