From: Sebastian T. <seb...@gm...> - 2018-04-12 17:29:39
|
Sorry, I might have been not precise enough with my explanation. I'm trying to connect to the database on the network - not a local one and unfortunately I don't have access to that database files and I won't but I've received its IP address, username with readonly access and his pw. Command I'm trying to use it psql --host=<ip-address> --port=5432 --username=username IP address I'm giving is the same as the one set in config.inc.php phpPgAdmin is running on my machine Windows 7 and it is able to connect nicely. Postgres version is: 9.5.3 Is it possible even that it is a Postgres misconfigurations fault here when phpPgAdmin works fine but psql doesn't? I'm still blaming my setup but I have no idea what can I do. On 12 April 2018 at 19:12, Karl O. Pinc <ko...@me...> wrote: > On Thu, 12 Apr 2018 18:54:49 +0200 > Sebastian Tarach <seb...@gm...> wrote: > > > When I'm trying to connect to db server form psql command I get > > following error: > > > > psql: > > > > FATAL: no pg_hba.conf entry for host "ip", user "user", database > > "database", SSL on > > FATAL: no pg_hba.conf entry for host "ip", user "user", database > > "database", SSL off > > > > At the same time accessing the database from phpPgAdmin work's fine. > > Both are executed on the same host > > We'd have to see your pg_hba.conf file and your psql command to be > sure of what the problem is. You're probably trying to use psql > to connect to the hosts IP on the network instead of connecting to > "localhost" or to the Postgres socket file (which is probably in > /tmp/). > > For interactive help with a psql question you can use > IRC to chat. The host is irc.freenode.net and the channel > is "#postgresql". (There's probably instructions for this at > postgresql.org.) > > Regards, > > > Karl <ko...@me...> > Free Software: "You don't pay back, you pay forward." > -- Robert A. Heinlein > |