Answer the question
In order to leave comments, you need to log in
Why can't I run mysql on docker under windows?
Hello. Please help me fix the problem. I'm trying to run the official mysql dcker image from the hub
docker run --name db -d -e MYSQL_ROOT_PASSWORD=12345 -p 3306:3306 mysql:latest
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"MacAddress": "02:42:ac:11:00:02",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "c6afea81da99ce7116ab0d01a2f95cf850146cf0b9382c99933ee0c94a697dca",
"EndpointID": "922227091e059d25a528d2b76ebe0097d17772dc8c028b5b3652e15cad56502f",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
"IPPrefixLen": 16,
"IPv6Gateway": "",
"GlobalIPv6Address": "",
"GlobalIPv6PrefixLen": 0,
"MacAddress": "02:42:ac:11:00:02"
}
}
}
./mysql.exe -uroot -p12345
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
./mysql.exe -uroot -h 172.17.0.2 -p214189
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2003 (HY000): Can't connect to MySQL server on '172.17.0.2' (10060)
Answer the question
In order to leave comments, you need to log in
Try to specify the port as follows
AND correctly specify what you want to build the container from-d mysql:latest
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question