Generating database diagrams for schema analysis using schema spy

Hi there I am new with Bahmni, and I want to generate database diagrams from the Bahmni virtual box running on my laptop I read a lot of docs in Bahmni wiki including this document that descrip what i want using this command java -jar schemaSpy_5.0.0.jar -t pgsql -db openerp -s public -u openerp -p <password> -host <host> -o <output dir> -dp <path-to-the-db-driver> but the problem is that i dont know how to get the password and the host name and the path to the db driver, i have downloaded the postgresql-8.0-312.jdbc3.jar and put it next to the scemaSpy.jar and tried to use the password “openmrs” and the host ip for my current running vagrant box witch is 192.168.33.10 but gave me the error

org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)```

See if this helps: https://bahmni.atlassian.net/wiki/spaces/BAH/pages/49545219/Connecting+to+various+databases

thank you for your response, I did what was mentioned in the link you sent, I tried this command

java -jar schemaSpy_5.0.0.jar -t pgsql  -db openerp -s public -u openerp -p openerp -host 192.168.33.10 -port 3306 -o out -dp postgresql-8.0-312.jdbc3.jar

this command executed the following error

Using database properties:
  [schemaSpy_5.0.0.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties

Failed to connect to database URL [jdbc:postgresql://192.168.33.10/openerp]

org.postgresql.util.PSQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:122)
        at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:65)
        at org.postgresql.jdbc2.AbstractJdbc2Connection.<init>(AbstractJdbc2Connection.java:117)
        at org.postgresql.jdbc3.AbstractJdbc3Connection.<init>(AbstractJdbc3Connection.java:30)
        at org.postgresql.jdbc3.Jdbc3Connection.<init>(Jdbc3Connection.java:24)
        at org.postgresql.Driver.connect(Driver.java:235)
        at net.sourceforge.schemaspy.SchemaAnalyzer.getConnection(SchemaAnalyzer.java:582)
        at net.sourceforge.schemaspy.SchemaAnalyzer.analyze(SchemaAnalyzer.java:157)
        at net.sourceforge.schemaspy.Main.main(Main.java:42)
Caused by: java.net.ConnectException: Connection timed out: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at org.postgresql.core.PGStream.<init>(PGStream.java:58)
        at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:77)
        ... 8 more

any help please, I just want to generate the diagrams, so I can work on the database. I think such diagrams should be available without going through this process thank you in advance

The problem is that your command running on “host” machine, is not able to connect to postgres db which is running in “vagrant” machine. This is likely because the postgres port is not accessible from outside the vagrant box, but only accessible from within the vagrant box.

One option is to run the schema_spy command from within the vagrant box. Just run the same command from inside vagrant (u may need to copy the jar to your vagrant folder, so that is accessible from inside the vagrant machine).

Alternatively, if you wish to expose postgres DB outside the vagrant, then first ensure the postgres is actually available outside. Read this: postgresql - Cannot connect to Postgres running on VM from host machine using MD5 method - Stack Overflow

Another option is to just install postgres DB on your host machine, export the DB schema into a file, and import it on your host machine. That way u have the same Odoo db in your local.

Or just google for Odoo v10 schema diagram. Like this: Has anyone come across a Database Schema of Odoo v10? | Odoo

Ok thank you, I appreciate your help and it solved my problem