One Solution collect form web for “Running MariaDB in a docker container using docker stack”

One way of diagnosing this issue is to look at the logs. To get the logs do docker ps to get a list of the containers then docker logs -f <container ID> to get the log result. Since it is on a docker-compose the container may go away after a short while so the -f option will keep it connected until it terminates.

To resolve the issue which the logs say that there needs to be a password for the root user, I just needed to add