I am trying to have Metabase use Maria DB as the application Database.
I am running metabase in a docker container and have specified the necessary environment variables in the docker compose as follows:
environment:
- MD_DB_TYPE=mysql
- MB_DB_DBNAME=metabase
- MB_DB_PORT=3306
- MB_DB_USER=metabase
- MB_DB_PASS=<password>
- MB_DB_HOST=<DB Host>
And in the container, metabase is started by running the jar:
java -jar metabase.jar
Still, in the logs, I see metabase is starting up a H₂ database and doesn't connect to the Maria DB table.
metabase | 2022-01-18 22:53:23,721 WARN db.env :: WARNING: Using Metabase with an H2 application database is not recommended for production deployments. For production deployments, we highly recommend using Postgres, MySQL, or MariaDB instead. If you decide to continue to use H2, please be sure to back up the database file regularly. For more information, see https://metabase.com/docs/latest/operations-guide/migrating-from-h2.html
I am even printing the environment variables before the java command is run to see if the variables are set properly, and I can see the following:
metabase | HOSTNAME=20b98bbbb485
metabase | SHLVL=0
metabase | HOME=/root
metabase | MB_DB_DBNAME=metabase
metabase | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
metabase | MB_DB_PASS=<password>
metabase | LANG=C.UTF-8
metabase | QEMU_CPU=arm1176
metabase | DEBIAN_FRONTEND=noninteractive
metabase | MB_DB_HOST=<DB Host>
metabase | MB_DB_USER=metabase
metabase | UDEV=off
metabase | LC_ALL=C.UTF-8
metabase | JAVA_HOME=/docker-java-home
metabase | PWD=/
metabase | MD_DB_TYPE=mysql
metabase | MB_DB_PORT=3306
This seems like a bug as I would expect that with these env variables set, it should connect to MySQL.
I am using the latest versions of both Metabase (0.41.6) and Maria DB (10.5.13) on a Balena openjdk base container (debian based).
Can someone help me with this?