Answer the question
In order to leave comments, you need to log in
Why can't I reach the MariaDB console in a Docker container?
Launched the MariaDB container. The connection to the database is established and it is fully working (connected from phpMyAdmin, HeidiSQL, JS scripts).
The next step was setting up the database backup. And then a problem arose.
I go into the container, connect to the MYSQL console, ask for the admin password and after entering it - silence.
Without entering the container, I connect to the MYSQL console using standard linux tools, referring to the container database, it also asks for the admin password and after entering it - silence.
Tried to connect from outside - the same result.
docker-compose exec mysql sh 'mysql -uroot -pSECRET' > all-databases.sql
Answer the question
In order to leave comments, you need to log in
Because the mysql utility needs a terminal. docker exec ...
Simply use insteaddocker exec -it ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question