(CC-ing the list) Hmm, that should just work.
Are there any special characters in the username, password or host (non-ascii, URL unsafe characters) ? You could try the explicit init form P3Client new host: 'host'; user: 'user'; password: 'password'; database: 'database'; yourself. > On 18 May 2021, at 19:47, Bernhard Pieber <bernh...@pieber.com> wrote: > > Hi Sven, > > Thank you for the fast response. > > Yes, I can connect using the psql client using this command line: > C:\PostgreSQL\12\bin\psql.exe -h host -U user -d database -p 5432 > > I have to enter the password in the command prompt. > > The driver URL in SQuirreL is: > jdbc:postgresql://host:5432/database > > User name and password are separate text fields. > > pgAdmin also works, by the way. > > In P3 I use the long form: > P3Client new url: 'psql://user:password@host:5432/database'. > > Cheers, > Bernhard > >> Am 18.05.2021 um 19:16 schrieb Sven Van Caekenberghe <s...@stfx.eu>: >> >> >> Hi Bernard, >> >>> On 18 May 2021, at 18:40, Bernhard Pieber <bernh...@pieber.com> wrote: >>> >>> Hi, >>> >>> I have a PostgreSQL database on a remote host which I want to access using >>> P3. I do have a username and a password and can connect via SQuirreL and >>> DBeaver. Both use a JDBC driver. However, when I try to access it via Pharo >>> and P3 I get the infamous "no pg_hba.conf entry for host <my IP address>“ >>> error. The thing is that I cannot change the pg_hba.conf file as the server >>> does not belong to me. I wonder why the JDBC driver does not run into this >>> problem when connecting from my IP address? It must do something >>> differently. >>> >>> As I have just started playing with P3 (and PostgreSQL to be honest) I may >>> be missing something fundamental. Using #setSSL did not help, by the way. >>> Any other ideas I could try? >>> >>> Cheers, >>> Bernhard >> >> This is an interesting problem: to do a remote, over the network, connection >> this has to be enabled in PostegreSQL in the pg_hba.conf. But since other >> clients can connect, it would help if you could give me more details >> regarding their connection settings. I know this could include confidential >> information, so be careful what you post. >> >> You could also try to connect using the command line psql client, from your >> machine. >> >> Sven >