Answer the question
In order to leave comments, you need to log in
Why can't connect to MySQL via Docker container?
For some reason, my test to connect to MySQL fails, what could be the reason?
If we are in the host folder that we are going to connect to Docker, it turns out that just a slash from the host side will be enough?
-v /:/var/lib/mysql
Here an error occurs when test connection to MySQL
Answer the question
In order to leave comments, you need to log in
/ means the root folder of the host, not the current one. The current one will be .
The connection error may also be due to the authentication method. But as I see you launched without a password. I don't know, some clients don't connect normally without passwords.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question