Comments - Installing and Using MariaDB via Docker

3 years, 3 months ago Federico Razzoli

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.

 
3 years, 3 months ago Anel Husakovic

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:

$ docker network create mariadb-net
$ docker run --net mariadb-net --name mariadb-c1 -e MYSQL_ROOT_PASSWORD=root -d mariadb:10.5

$docker run -it --network mariadb-net --rm mariadb:10.5 mysql -hmariadb-c1 -uroot -proot

Federico if you are ok with this, I can update the wiki.

 
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.