[Answer]-Django cannot connect to Postgresql on Opensuse

1👍

Edit the /var/lib/pgsql/data/pg_hba.conf file and change the method from trust to md5. This way Postgres will ask for a password.

Also remember to reload the configuration file.

0👍

Have you tried changing:

host    all             all             127.0.0.1/32            ident

to:

host    all             all             127.0.0.1/32            md5

It appears that you are connecting via TCP (so the first line in pg_hba.confg with “trust” doesn’t apply) and authenticate via ident, which requires entries in pg_ident.conf. You probably want “md5” or one of the other password-based authentication options.

👤Smith

Leave a comment