Im trying to make a remote connection using a Windows Program called "EMS PostgreSQL Manager".
I am having issues setting up the pg_hba.conf properly to allow a user to make connections only to his assigned database.
Following the PostgreSQL documentation I could sucessfuly connect using a user password with the following entry in pg_hba.conf:
host all all my_ip 255.255.255.255 md5
With the above line I could connect to the server using a user password, although I could see all the databases of the server and manage all of them.
When I change it to:
host database_that_user_should_connect all my_ip 255.255.255.255 md5
I get an error message: no pga_hba.conf entry for host "my_ip", user "user", database "template1" (dont know why it says template1 if the database I choose was another one)
I have also tried using:
host all all my_ip 255.255.255.255 ident test
With the proper lines inside pg_ident.conf for "test" *******:
pg_ident.conf test user pg_user
With no success
Anyone can help me ? I would like to allow a pg user to connect only to his assigned database providing the correct password.