0

I've recently started work on a project that requires a psql database. I've followed numerous guides on setting up psql database on fedora, and have got my db up and running. I am able to connect into it using sudo -u postgres psql the project I am working on has a init-db bash scrip that is used to set up all the relation and tables for the database, which I am able to query once I am in the psql view on my terminal.

My issue is that no other application or software is able to connect to the database. At first I though it was a issue with the code left by previous developers but with further investigation I am unable to connect to it even using Jetbrain 'Database Tools and SQL' plug in. I Have Tried a few thing to fix this (listed bellow) but none have worked

  1. edited the postgresql.conf file to contain linsten_addresses = '*'
  1. editted the pg_hba.conf file to have host all all 0.0.0.0/0
  1. tried connecting to the database via JetBrains 'Database Tools and SQL' using localhost, my public ip, and my private ip

( yes I am sure i have to correct login details )

None of the above worked. I have tinkered with this for 4 hours now and have not gotten it to connect, so any suggestions would be much appreciated. If there is anything that i have missed out please ask and I will update the post with the needed information

1 Answers1

0

Setting IPv4 local connections:

host all all 127.0.0.1/32 md5

(changed 'ident' to 'md5') in /var/lib/pgsql/data/pg_hba.conf file worked for me. (Fedora Linux 38, JetBrains PhpStorm PostgreSQL connection issue).

Sabir Ali
  • 1
  • 2
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 28 '23 at 20:19