I have a problem to connect server for Postgres after I updated my windows.Before I update there is no problem to open the database. My database in Postgres also gone. When I wa
I think the problem is with your server listening to default public IP address. For example in the PostgreSQL package, your sever is set to listen to localhost as default public address which when you launch/ run database, the address might be something like '127.0.0.1'
To fix you can try change localhost to '' as in "listen_addresses = ''".
As seen as "listen_addresses = 'localhost'" under "Connection Settings" in the postgresql.conf file.
Also to access your postgresql.conf file, go to:
On Windows, the file is in /Program Files/PostgreSQL//share/. On Ubuntu, these files are in /etc/postgresql//main/.
P.S: Changing the defaults 'localhost'; to '*' will let your server listen to any public database address either "localhost, 127.0.0.1 etc.
I know you might have fix this, just for others that might run into the same issue in the future. Hope it was helpful
I got this error message when I moved my database to another computer.
I also got some error messages when starting the server first with
pg_ctl -D /wherever/your/database/is start
which were
pg_ctl: another server might be running; trying to start server anyway server starting
DETAIL: File "/wherever/your/database/is/PG_VERSION" does not contain valid data.
HINT: You might need to initdb.
In my case rather than running initdb this command actually fixed the issue
pg_ctl -D /wherever/your/database/is restart
On windows, Just go to the 'Services'. Start/Restart the postgresql-X64 service. It worked for me as my service was in stopped state somehow.
worked for me
On windows, Just go to the 'Services'. Start/Restart the postgresql-X64 service. It worked for me as my service was in stopped state somehow.
There are two items to configure if your server isn't on localhost:
postgresql.conf
and add your server's public IP address to the end of the setting listen_addresses
(separate multiple entries by commas); uncomment the line if it is commented out (e.g. with '#')pg_hba.conf
containing your client's IP address - you may copy the line containing 127.0.0.1 and change only the IP addressOn Ubuntu, these files are in /etc/postgresql/<version>/main/
.
In my case I couldnt' open the pgAdmin4, for some reason. I use Postgresql 10 and pgAdmin4
The port
in the postgresql.conf
was not the same as in the pgAdmin4 --> postgreSQL 10 --> properties --> Connection --> port.
I fixed it and it worked. Check if those 2 are in line.