Answer the question
In order to leave comments, you need to log in
Docker: container with mysql, do you really need to manually expose the host to the user?
Contents of docker-compose (for mysql):
mysql:
image: mysql:8.0.4
container_name: mysql
restart: on-failure
ports:
- '3306:3306'
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
UPDATE user SET host='%' where user='my_user';
Answer the question
In order to leave comments, you need to log in
I remember that I didn’t have such a problem, did you accurately configure the internal network?) There you need to create an internal network and specify it in the containers
my example
if so, how do they decide?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question