Comments - Installing and Using MariaDB via Docker
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
I tried the example on Ubuntu 21.04. It was not working
Changing to
made it work
If we need to specify port, datadir, or tmpdir etc in the docker my.cnf, how can we provide this if persistent storage is being used?
Hi Taran. You can use volumes for /etc/mysql, for /var/lib/mysql/data, etc. So these directories are persistent, and you can easily edit your my.cnf setting the proper paths. I'm not completely sure this answers your question, so please let me know if you still have doubts.
You can create a network and start detached process on that network, since bridge network doesn't work.
After that you can connect from different container running mysql like this:
Federico if you are ok with this, I can update the wiki.
I'm just getting started with Docker and containers. Despite being specific to MariaDB this knowledge provided me with a few additional insights into Docker that are missing from other Docker resources. Great job.