Closed ocourch closed 2 years ago
How are you running the docker container? In case you are already running something on 3306, you could try exposing it on (say) 3307:
docker run -p 8080:80 -p 3307:3306 --name running_onezoom onezoom/oztree-complete
Then wait for 5 mins and try e.g.
mysql --port=3307 --user=oz --password=passwd --host 127.0.0.1
thanks! I think this is working now
Attempting to connect to the Mysql instance from outside the container isn't working. I'm using the specified port but get the following error:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
I tried using the mysqld.sock that Docker owns, but that failed as well:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/snap/docker/common/var-lib-docker/overlay2/83dd9263ca23db83a8354d85ecb15e030c9e67d0d564605bbdae' (2)
Here's the command I'm using, with the password field filled in:
mysql --port=3306 --user=oz --password=<>