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)
9284
11.01.2020 21:11
- Remote access to MySQL database
4912
16.01.2018 15:29
- Nameserver for my vps
4618
07.08.2018 11:35
- Upgrading your VPS - need to extend your disk? The Easy way!
4541
14.02.2019 16:06
- Redirect domain to vps
4429
03.01.2018 22:32
- IPv6 Configuration
4240
30.07.2018 12:50
- Change server location
3859
06.11.2020 10:16
- Not able to connect to my server at all
3532
17.09.2020 19:56
- How to OVH Firewall and VPN
3478
29.10.2019 12:16
- Test latency of EU data centers
2733
30.01.2019 20:50