MySQL bind-address in a Docker container

北城以北 提交于 2019-12-04 23:16:23

问题


I would like to build a container, which enables bind to multiple IP addresses. Bind address is stored in my.cnf, it is okay. How to define it or maybe comment out with use of a Dockerfile to grant remote access?


回答1:


sed is usually the weapon of choice for such tasks. Taken from the official mysql dockerfile:

RUN sed -Ei 's/^(bind-address|log)/#&/' /etc/mysql/my.cnf

The command comments out lines starting with bind-address or log in my.cnf or conf.d/*.



来源:https://stackoverflow.com/questions/34633961/mysql-bind-address-in-a-docker-container

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!