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 OPTION;
I've added bind-address = 0.0.0.0
into /etc/my.cnf. None of this helps. What gives?
Context: I'm running all of this through boot2docker on OS X Yosemite.
netstat
? Is MySQL listening? – Statesmanshiplsof -i 3306
, I seelocalhost:mysql (LISTEN)
(on localhost) – Grandmysql -h localhost
? Does it work? Which command do you use to run MySQL? – Statesmanship