Connecting to MySQL Server on localhost through Docker
问题 So, I'm able to generally contact my localhost through Docker by running a container with --add-host=localbox:192.168.59.3 . ping localbox works just fine. Problem is, I can't seem to be able to even get a response from MySQL Server. mysql -h localbox , which works fine from outside of the docker container, just gets me ERROR 2003 (HY000): Can't connect to MySQL server on 'localbox' (111) from within. I've done GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT