I have installed PostgreSql on my machine which I want to use a external DB for the Dockerized Laravel Web app.
I donot want to use the postgre image, need to use the local DB, it can be mysql as well.
DB_HOST= 127.0.0.1 or localhost
Error is given below:
SQLSTATE  could not connect to server: Connection refused
Is the server running on host “127.0.0.1” and accepting TCP/IP connections on port 5432?**
The reason of the issue I know the application container is not connecting to the external DB as it is outside of its filesystem.
If I change the DB_HOST to the local IP Address, there comes up the below error:
SQLSTATE  FATAL: no pg_hba.conf entry for host “10.0.9.57”,
Urgent Help would be highly appreciated.