Installing MySQL in Docker fails with error message “Can't connect to local MySQL server through socket”

后端 未结 13 1471
轻奢々
轻奢々 2020-12-13 01:53

I\'m trying to install mysql inside a docker container,Tried various images from github, it seems they all manage to successfully install the mysql but when I try to run the

13条回答
  •  半阙折子戏
    2020-12-13 02:10

    Months after this question, I've levelup my Docker skills. I should use Docker container name instead.

    That use dokerized-nginx as bridge to expose ip+port of the container.

    Within WEB configuration, I now use mysql://USERNAME:PASSWORD@docker_container_name/DB_NAME to access to Mysql socket through docker (also works with docker-compose, use compose-name instead of container one)

提交回复
热议问题