Questions tagged [pg-hba.conf]
45 questions
384
votes
12 answers
connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host
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 "dbXXX", SSL off in C:\xampp\htdocs\xmastool\index.php on…
Jin
- 3,953
- 3
- 14
- 6
29
votes
6 answers
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 following a change in pg_hba.conf.
However,…
Sébastien Clément
- 1,825
- 3
- 19
- 28
25
votes
1 answer
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 shells on both nodes)
For the non-replication…
victorjtfranco
- 353
- 1
- 3
- 5
21
votes
2 answers
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 myuser md5
I restarted PostgreSQL with sudo service…
Daniel
- 327
- 1
- 2
- 7
13
votes
3 answers
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 03:44:34 GMT FATAL: terminating connection due to…
Pavel Naydenov
- 133
- 1
- 1
- 4
12
votes
2 answers
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 reloading/restarting the service, or even better, after…
Rémi B.
- 369
- 1
- 3
- 9
11
votes
1 answer
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 my changes wouldn't work:
I'm editing the wrong…
stvsmth
- 213
- 1
- 2
- 8
7
votes
2 answers
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 connect to the server it just says FATAL: could…
temporary_user_name
- 193
- 1
- 2
- 7
5
votes
1 answer
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 connections:
host all all …
Devdatta Tengshe
- 631
- 4
- 9
- 16
5
votes
2 answers
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 another machine (Windows 7) using LAN connectivity (so…
Jibran Khan
- 51
- 1
- 1
- 2
4
votes
1 answer
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 for this and it looks like:
local replication …
user2288360
- 41
- 1
- 2
4
votes
2 answers
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.
My current configuration looks like so:
host all…
subdavis
- 181
- 1
- 7
4
votes
1 answer
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 to store passwords where you would not have to…
Pamela Cook - LightBe Corp
- 165
- 1
- 1
- 7
3
votes
1 answer
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.conf in the system. However, when I tried to open…
RBK
- 133
- 1
- 5
3
votes
1 answer
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 before you start the server for the first time.
Is the…
da99
- 399
- 4
- 11