I am working on a friend's VPS in order to set up a database for a discord bot they have commissioned me to make. In production, both the bot and database will be hosted on the same server so I won't need to be able to establish a remote connection to the database from some other computer however for testing and development reasons, I'm hosting the bot on my personal computer and the database needs to be able to be connected to remotely.
Over the past couple of days, I've attempted to set it up to allow remote connections however I've been completely unsuccessful and despite watching numerous youtube and text tutorials/guides I cannot figure out why on earth it isn't working. I suspect that OVH physically blocks the ability to use a VPS to host a remote database as they already sell database-specific services. By giving users the ability to host it themselves, it would defeat the purpose of those additional services they offer.
This is becoming rather frustrating as I never intend on using the remote database in the long run and just want to be able to easily connect to it for testing purposes. My issue is that after editing the /postgresql.conf file with the line `listen_addresses = '*'` and the /pg_hba.conf to include the lines `host all all 0.0.0.0/0 md5
host all all :/0 md5` and after reloading the config and restarting PostgreSQL, when using the command "psql" it returns this error: `psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?` - that command works all the time up to that point and external connections still don't work either.
If someone could help me at all it would be greatly appreciated, thanks.
- Morgan
Unable to connect to postgres database hosted on OVH VPS (issue with pg_hba.conf)
Related questions
- Installing Operating System from custom image on OVH VPS ( CentOS 8 Tutorial)
53440
11.01.2020 21:11
- SMTP server on VPS and port 25 opening
43616
10.12.2025 13:59
- Mumbai VPS data-center availability
42547
23.12.2025 04:48
- Nameserver for my vps
40676
07.08.2018 11:35
- Remote access to MySQL database
39851
16.01.2018 15:29
- VPS stuck in “Saving…” for over 24 hours – No SSH, No KVM, No Rescue
37975
10.01.2026 22:36
- Advice on products to run a simple website + CMS.
35685
07.01.2026 14:58
- Change server location
33264
06.11.2020 10:16
- VPS login and password not accepted. Reboot in Rescue Mode results in root and temp password not being accepted
33133
15.01.2026 20:04
- Redirect domain to vps
33035
03.01.2018 22:32