The following command runs fine, that is, doesn't ask for a password, prints no warnings or errors, and simply provides a DB prompt:
$ psql -U dbuser dbname
psql (8.4.10)
Type "help" for help.
dbname=#
When trying to generate an ERD out of this DB with SchemaSpy (running as the same host user), it doesn't work:
$ java -jar ~/schemaSpy.jar -dp /usr/share/java/postgresql.jar -t pgsql \
-host localhost -db dbname -u dbuser -o ~/db
Using database properties:
[/[...]/schemaSpy.jar]/net/sourceforge/schemaspy/dbTypes/pgsql.properties
Failed to connect to database URL [jdbc:postgresql://localhost/dbname]
org.postgresql.util.PSQLException: The server requested password-based
authentication, but no password was provided.
If I try with a blank password (-p ''), it instead prints:
org.postgresql.util.PSQLException: FATAL: password authentication failed for
user "dbuser"
How do I run SchemaSpy on a PostgreSQL database with a DB user that has no password?
I tried changing the pg_hba.conf settings to completely permissive, but it still doesn't work:
$ sudo grep ^local /etc/postgresql/*/main/pg_hba.conf
local all postgres ident
local all all trust

psqlandlibpg-javaare Ubuntu packages. – l0b0 Feb 3 at 10:56