Answer the question
In order to leave comments, you need to log in
Why can't I get data from the database?
I'm getting acquainted with the symphony and I can't understand one thing.
Launched symfony nginx php postgres project in docker.
Rolled into the migration database and fake data from the console (there were no errors about connecting to the database).
I'm trying to get data from the database through the controller and writes
An exception occurred in the driver: SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 15432?
DATABASE_URL="postgresql://user:[email protected]:15432/db?serverVersion=12&charset=utf8
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '13'
driver: pdo_pgsql
server_version: '12'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question