I use the following Schemaspy to connect to one postgreSQL DB successfully. But when I connect to another DB, it reports error "failed to connect to database URL [jdbc....]"
java -jar schemaSpy.jar -t pgsql -db erp -host 122.5.XX.XX -port 2345 -u olive -p zhy -o dbschema -dp postgresql-9.4-1201.jdbc41.jar -s public
I am not postgreSQL expert. The host IP address could be pinged, and I could use pgadmin to connect to the DB.
Is there any postgreSQL setting I need to pay attention for the DB so that it could be connected by schemaspy? or any special port I need to open?
Thanks.
Just now I figured out the reason. SchemaSpy has one bug. It ignores -port parameter and always connects to 5432 port. So I change command to -host 122.5.XX.XX:2345 and it connects to DB correctly now.
For the first DB which was successful before, it uses 5432 port and so I didn't notice the issue.
Anyway, it is fixed now. :)