Skip to content

MariaDB stack documentation

MariaDB can be configured with the following environment variables

Calculating the optimal size of innodb_buffer_pool_size

Run the following query to get the recommend innodb buffer pool size:

Recommended_InnoDB_Buffer_Pool_Size FROM
        SELECT SUM(data_length+index_length)*1.1*growth RIBPS
        FROM information_schema.tables AAA,
        (SELECT 1.25 growth) BBB
        WHERE ENGINE='InnoDB'
    ) AA
) A;

Source: by RolandoMySQLDBA from the answer on dba stackexchange.

External access

Publish port

You can publish MariaDB's port (3306) from stack configuration page and connect as:

$ mysql -h=[IP] -P[PORT] -u[USER] -p[PASSWORD] [DATABASE]

For [IP] use the IP of the server where PostgreSQL stack deployed or use a technical host node-[SERVER UUID]

Set up tunnel

If you deploy MariaDB as a service inside of a stack that comes with an SSHD container, you can set up a secure tunnel:

  1. Set up SSH tunnel on port 53306 (you can change it). You can find [SSH Port] on Instance > Stack > SSH page. For MariaDB (port 3306 by default) use the following command:
    $ ssh -L 53306:mariadb:3306 -p [SSH Port] wodby@[Server IP] -N
  2. Connect to the database via the tunnel on port 53306 (replace [tokens]):
    $ mysql --protocol=TCP -P53306 -u[USER] -p[PASSWORD] [DATABASE]

Local environment

Import existing database

if you want to import your database, uncomment the line for mariadb-init volume in your compose file. Create the volume directory ./mariadb-init in the same directory as the compose file and put there your .sql .sql.gz .sh file(s). All SQL files will be automatically imported once MariaDB container has started.


Exporting all databases:

docker-compose exec mariadb sh -c 'exec mysqldump --all-databases -uroot -p"root-password"' > databases.sql

Exporting a specific database:

docker-compose exec mariadb sh -c 'exec mysqldump -uroot -p"root-password" my-db' > my-db.sql


This changelog is for MariaDB stack on Wodby, to see image changes see tags description on repository page.


MariaDB patch update: 10.1.36


  • MariaDB patch updates: 10.3.9, 10.2.17, 10.1.35
  • Image rebased to Alpine Linux 3.8
  • Backup action performance improvement: no intermediate file created
  • Bugfix: triggers duplicated during db dump
  • Bugfix: no privileges before import could cause failure
  • ionice no longer used in orchestration actions


  • New version 10.3 added (10.3.7)
  • MariaDB updates: 10.2.15, 10.1.34
  • optimizer_prune_level and optimizer_search_depth are now configurable
  • ❗Default innodb_buffer_pool_size set to 128M that should significantly decrease memory usage by MariaDB container. See stack documentation to learn how to calculate the optimal size of innodb_buffer_pool_size for your application
  • Default innodb_buffer_pool_instances set to 1


  • Updated to 10.1.31, 10.2.12
  • Rebased to Alpine Linux 3.7
  • Default memory request set to 64m


  • Restored MariaDB 10.1 innodb_large_prefix setting (enabled by default) removed in 2.0.0


  • New MariaDB 10.2.11
  • MariaDB updated to 10.1.29
  • Shutdown grace period increased to 5 minutes
  • Health check timeout increased to 30 seconds
  • Deployment strategy no longer can be changed
  • Optimized default values in my.cnf
  • New environment variables to configure recovery options
  • Default user/group in a container now mysql
  • Backup action now runs with nice (10) and ionice (7)
  • Improved error handling in import action


  • MariaDB updated to 10.1.26


  • Directory __MACOSX now excluded from import archive


  • MariaDB now recovers privileges in case of an error during import


  • Priveleges are now revoked for a regular user during import
  • Bug fix: sometimes tables weren't ignored during backup


Initial release