Questions tagged [pg-hba.conf]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
212
votes
13answers
540k views

connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host

Hello I am trying to run a website sent to me but after doing so this error appeared connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "4X.XXX.XX.XXX", user "userXXX", database "...
16
votes
6answers
105k views

How to restart PostgreSQL server under CentOS 7

I installed PostgreSQL 10.1 under a CentOS 7.3 environment. The service is started (postmaster.pid file present under /var/lib/pgsql/10/data), but I need to reload configuration or restart the server ...
12
votes
2answers
41k views

psql: FATAL: Peer authentication failed for user

I just installed PostgreSQL 9.4 on Ubuntu 15.10. I created a user with createuser -P myuser I created a database with createdb -O myuser mydatabase I edited pg_hba.conf and added local mydatabase ...
9
votes
1answer
7k views

Postgres seems to ignore listen_addresses setting

I'm trying to DISABLE remote client access on my Postgres 9.5.7 database (running Ubuntu 16.04). I made what I thought are the correct changes (see below) to no avail. I can think of two reasons why ...
8
votes
1answer
10k views

How do I query the running pg_hba configuration?

I want to test if a replication connection is authorized by pg_hba.conf on the provider before issuing the replication-starting command, and don't know how. (I have access to both unix and postgresql ...
6
votes
1answer
9k views

How to check the syntax of pg_hba.conf and other postgresql conf files on ubuntu/debian/linux?

Many times, the postgresql service can't restart after some configuration changes. Is there any command line tool allowing to check the syntax of pg_hba.conf and other pg *.conf files before ...
5
votes
2answers
24k views

What am I doing wrong with pg_hba.conf?

I'm trying to make it so that local connections to the database don't require a login. So I added the line local all all trust to the pg_hba.conf file, but then when I load pgAdmin and try to ...
4
votes
2answers
17k views

Using postgres database from another computer

I have PostgreSQL version 9.5 installed at my machine (Windows 7 Enterprise x64 bit version). I have several databases in schema 'public'. I would like to use/access one of these databases from ...
4
votes
1answer
4k views

Unexpected PostgreSQL restart

My PostgreSQL server unexpectedly restarted with such messages: 2017-08-16 03:44:34 GMT LOG: received fast shutdown request 2017-08-16 03:44:34 GMT LOG: aborting any active transactions 2017-08-16 ...
4
votes
1answer
3k views

postgresql - a local replication entry doesn't work

Maybe it's just too early in the morning, but I can't seem to get pg_basebackup working for a local user. This is part of testing for an hourly backup automated script. I added a line to pg_hba.conf ...
4
votes
1answer
870 views

I Need Help Setting Up Roles and Passwords in PostgreSQL

I'm using the postgres.app on my Mac Mini Server running version 9.4.0 using El Capitan. I have not done any customization in pg-hba.conf. I do not have a .pgpass file. I believe that .pgpass is used ...
3
votes
2answers
4k views

Postgresql pg_hba.conf changes are ignored or not loaded

Using Postgresql 9.3 on Ubuntu 14.04.4 LTS I've been changing the /etc/postgresql/9.3/main/pg_hba.conf config file madly trying to make a change that will allow me to log in with any user remotely. ...
3
votes
1answer
84 views

Why does the PG manual state to modify the “pg_hba.conf” file before starting the server the first time?

The following is from https://www.postgresql.org/docs/current/static/creating-cluster.html with original emphasis on before: or modify the generated pg_hba.conf file after running initdb, but ...
3
votes
1answer
4k views

pg_hba.conf allow mutliple I.P. addresses for single user

In my pg_hba.conf, I need a single user to be allowed to connect from two completely different IP addresses (like work and home, for example). Something like the following would be really nice: host ...
3
votes
1answer
292 views

How do I enable md5 authentication for only one user?

I just installed Postgres 9.2 on CentOS 7. I want to keep peer authentication for all my users except one, which I would like to be able to access via "psql" through any user's account. I tried ...
2
votes
1answer
1k views

Error: FATAL: no pg_hba.conf entry for host - PostgreSQL - pg_hba.conf is empty

I upgraded the PostgreSQL database from version 10 to 11. As I tried to access the database from a client pgadmin4 console, I got the below error: I checked the two file postgresql.conf and pg_hba....
2
votes
1answer
1k views

Cannot open `pg_hba.conf` in pgAdmin III

I am running: version ----------------------------------------------------------------------------------------------------- PostgreSQL 9.4.11 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8....
2
votes
1answer
336 views

pg_hba error while setting up repmgr

Please help me to figure it out, help is much appreciated! ERROR: FATAL: no pg_hba.conf entry for replication connection from host "172.18.0.4", user "repmgr", SSL on The following is a list of my ...
1
vote
1answer
6k views

How do I login to a Postgres database without a password?

Right now my Postgres' pg_hba.conf file has the following lines: # "local" is for Unix domain socket connections only local all all md5 # IPv4 local ...
1
vote
3answers
462 views

Get lines of pg_hba.conf with trust method from user with minimal privileges

I try on PostgreSQL 9.3 to get the lines of pg_hba.conf where the authentication method is trust from user with minimal privileges. I wrote a function, but it doesn't work: create function public....
1
vote
1answer
38 views

Unable to deny remote access to Postgresql even if there is no entry in pg_hba.conf [closed]

I have 5 Postgres Servers, with IP addresses let's say as A,B,C,D and E. A is the master server and remaining are the child servers which need to access A. In the postgresql.conf file of A, the listen ...
1
vote
1answer
1k views

For PostgreSQL database, restrict remote connections to password

I have recently set-up a PostgreSQL database on client's CentOs machine. Until now the remote access was restricted. Now I have tried to open the remote connections for us, with following entry in ...
1
vote
2answers
2k views

Access to database denied :ELEPHANTSQL on Bluemix - “No pg_hba.conf entry for host localhost, user ADMIN, database SYSTEM”

While trying to connect to my ElephantSQL database on Bluemix using pgadmin, it throws the following error. Access to database denied The server doesn't grant access to the database: the server ...
1
vote
1answer
324 views

pg_hba.conf entry query

I'm trying to formulate a rule from pg_hba.conf file. Thus far I have understood that pg_hba.conf file is used to give access to the specific user for a specific host. But I just want to take a second ...
1
vote
1answer
2k views

ALTER USER postgres PASSWORD null; now has locked me out of psql

I have installed postgresql version 9.3.14 on High Sierra via HomeBrew. Upon trying to access the server via psql, I was being prompted for a password for the user postgres. Using postgres as the ...
1
vote
1answer
241 views

script breaks my ability to run psql

I've successfully installed postgres on my Ubuntu machine. I am running a script for a website I am working on, here is the relevant code: apt-get -y install postgresql libpq-dev su postgres <<...
1
vote
1answer
64 views

How does postgres host based authentication work?

This is a duplicate of: https://stackoverflow.com/questions/55804806/how-does-postgres-host-based-authentication-work (I was asked to shift this query to DBA.Stackexchange) I am installing DSPACE ...
1
vote
0answers
24 views

Allow databases start with specific name

In PostgreSQL sometimes we replace a database, we rename the old when a create a new one, example: Database: test Rename database to: test-04-04 (date) Create a newdatabase: test Now we have a lot ...
0
votes
2answers
841 views

Edit pg_hba.conf file using pgAdmin 4

This other Question has Answers about viewing and editing settings in postgresql.conf file using pgAdmin 4. But those Answers did not mention editing the pg_hba.conf file used for authentication of ...
0
votes
1answer
12k views

no pg_hba.conf entry for replication connection from host

(Also posted to pgsql-general) I have been configuring a slave server that needs to connect to the host. Both the master and the standby servers have a pg_hba.conf that looks like this: # Allow ...
0
votes
1answer
152 views

Can duplicate pg_hba entries result in a connection error?

I have received the following error when attempting to connect to an Arch Linux server: Sequel::DatabaseConnectionErrorreplication#monitor PG::Error: could not connect to server: Connection refused ...
0
votes
1answer
1k views

pg_hba.conf from PostgreSQL

I have no idea how to configure that pg_hba.conf file, to connect with my server via pgAdmin. Right now i was trying to add: host all all host.name.org.pl trust host all all host.name.org.pl md5 ...
0
votes
1answer
49 views

postgresql does not seem to respect the pg_hba.conf config - how can I diagnose this?

I have the following pg_hba.conf: # TYPE DATABASE USER ADDRESS METHOD # "local" is for Unix domain socket connections only local all all ...
0
votes
2answers
26 views

need help understanding the error-message: Error Connecting to database FATAL : no pg_hba.conf entry

We're trying to connect to a postgres/postgis installation on a remote server, using QGIS-Application. When accessing from another pc or from the same pc via pgadmin4v4 with the same credential/...
0
votes
2answers
160 views

Is it possible to insert multiple IP addresses in a single entry in a pg_hba.conf file?

Let's say I have the following 3 child IP addresses - 192.168.10.15 ,192.168.10.41 and 192.168.10.81 1 master IP address - 192.168.10.37 I want the 3 child IP addresses to be able to access the master ...
0
votes
1answer
39 views

Postgres authentication fails: log refers to “line 90” in pg_hba.conf that shouldn't exist

Whatever settings I try, I keep getting connection errors, from external clients as well as trying to connect from a running console on the server itself. My last attempt for a local connection with "...
0
votes
0answers
4k views

pg_hba.conf and postgresql.conf in old installation directory

I have installed the PostgreSQL 9.4 on my MacBook via MacPorts, and I am trying to edit pg_hba.conf, but I don't see it in my current installation. Furthermore, psql is reporting that config_file is ...
0
votes
1answer
748 views

Reset postgres password v9.1 [closed]

I'm trying to reset my lost password for Postgres v9.1 (windows 7) like written at https://wiki.postgresql.org/wiki/FAQ#I_lost_the_database_password._What_can_I_do_to_recover_it.3F : 1. edit pg_hba....