Public | Automated Build

Last pushed: 6 months ago
Short Description
SchemaSpy + MySQL driver
Full Description

Extract schema from MySQL using the included MySQL connector (output to
/tmp/outdir/):

docker run -it --rm -v /tmp:/home/user/workdir tlvu/schemaspy \
-t mysql -o outdir -host dbhost -db dbname -u dbuser -p dbuserpasswd \
-dp ../pkg/mysql-conn.jar

The dbuser above only need to have select priviledge on the dbname.
To add such privilege:

echo "create user 'dbuser' identified by 'dbuserpasswd';
grant select on 'dbname'.* to 'dbuser'@'<fqdn hostname where this command
is being run>';" | mysql -h dbhost -u root -p

SchemaSpy help:

docker run -it --rm tlvu/schemaspy -h

To use an alternate JDBC driver than the provided ../pkg/mysql-conn.jar
(ex: for Postgres where the driver is not included or for a newer version
of the MySQL driver):

docker run -it --rm -v /tmp:/home/user/workdir \
-v /opt/mysqldriver:/opt/mysqldriver tlvu/schemaspy \
-t mysql -o outdir -host dbhost -db dbname -u dbuser -p dbuserpasswd \
-dp /opt/mysqldriver/mysql-conn.jar
Docker Pull Command
Owner
smartmatic
Source Repository

Comments (0)