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.