Answer the question
In order to leave comments, you need to log in
Why can't I connect to the database in docker?
Please explain to someone how to connect to the database in the docker.
In the admin, I go to the database, and in the lara, when I try to execute, php artisan october:up
I try to fill in the tables from the database, then a hollow error.
[Illuminate\Database\QueryException]
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known (SQL: select * from information_schema.tables where table_schema = database an
d table_name = migrations)
DB_CONNECTION=mysql
DB_HOST=october_plasma_db
DB_PORT=3306
DB_DATABASE=database
DB_USERNAME=root
DB_PASSWORD=example
october_plasma_db:
container_name: october_plasma_db
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
networks:
- october_plasma_backend
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