MariaDB docker container image
Smarty Shell Makefile
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci
10 Update MariaDB 10.3 patch Jul 3, 2018
.gitignore MariaDB 10.1 image Feb 20, 2017
README.md Update info Jul 3, 2018
release.sh Update MariaDB to 10.2.16 Jul 3, 2018

README.md

MariaDB Docker Container Image

Build Status Docker Pulls Docker Stars Docker Layers

❗Known issue with bind mounts on macOS and Windows

Latest MariaDB will fail to start on macOS and Windows with Probably out of disk space if you use bind mounts (volumes mounted from host). This (likely) happens because of recent changes in InnoDB, this bug addressed in MariaDB JIRA.

Solutions:

  • Use MariaDB 10.1 with stability tag 3.2.1 or higher
  • Not to use bind mounts, let docker manage volumes, since docker-ce 17.06 it won't clean up your volumes with docker system prune unless you specify --volumes flag

Docker Images

❗For better reliability we release images with stability tags (wodby/mariadb:10.3-X.X.X) which correspond to git tags. We strongly recommend using images only with stability tags.

Overview:

Supported tags and respective Dockerfile links:

Environment Variables

Variable 10.3 10.2 10.1
MYSQL_BACK_LOG 100 100 100
MYSQL_CHARACTER_SET_FILESYSTEM utf8 utf8 utf8
MYSQL_CHARACTER_SET_SERVER utf8 utf8 utf8
MYSQL_CLIENT_DEFAULT_CHARACTER_SET utf8 utf8 utf8
MYSQL_COLLATION_SERVER utf8_unicode_ci utf8_unicode_ci utf8_unicode_ci
MYSQL_DATABASE
MYSQL_DEFAULT_STORAGE_ENGINE InnoDB InnoDB InnoDB
MYSQL_DUMP_MAX_ALLOWED_PACKET 1G 1G 1G
MYSQL_GENERAL_LOG 1 1 1
MYSQL_INIT_CONNECT SET NAMES utf8 SET NAMES utf8 SET NAMES utf8
MYSQL_INNODB_BUFFER_POOL_INSTANCES 1 1 1
MYSQL_INNODB_BUFFER_POOL_SIZE 128M 128M 128M
MYSQL_INNODB_DATA_FILE_PATH ibdata1:10M:autoextend:max:10G ibdata1:10M:autoextend:max:10G ibdata1:10M:autoextend:max:10G
MYSQL_INNODB_FAST_SHUTDOWN 1 1 1
MYSQL_INNODB_FILE_FORMAT - - barracuda
MYSQL_INNODB_FILE_PER_TABLE 1 1 1
MYSQL_INNODB_FLUSH_LOG_AT_TRX_COMMIT 2 2 2
MYSQL_INNODB_FLUSH_METHOD O_DIRECT O_DIRECT O_DIRECT
MYSQL_INNODB_FORCE_LOAD_CORRUPTED 0 0 0
MYSQL_INNODB_IO_CAPACITY 200 200 200
MYSQL_INNODB_LARGE_PREFIX - - 1
MYSQL_INNODB_LOCK_WAIT_TIMEOUT 50 50 50
MYSQL_INNODB_LOG_BUFFER_SIZE 8M 8M 8M
MYSQL_INNODB_LOG_FILE_SIZE 128M 128M 128M
MYSQL_INNODB_LOG_FILES_IN_GROUP 2 2 2
MYSQL_INNODB_OLD_BLOCKS_TIME 1000 1000 1000
MYSQL_INNODB_OPEN_FILES 1024 1024 1024
MYSQL_INNODB_READ_IO_THREADS 4 4 4
MYSQL_INNODB_STATS_ON_METADATA OFF OFF OFF
MYSQL_INNODB_STRICT_MODE OFF OFF OFF
MYSQL_INNODB_WRITE_IO_THREADS 4 4 4
MYSQL_INTERACTIVE_TIMEOUT 420 420 420
MYSQL_JOIN_BUFFER_SIZE 8M 8M 8M
MYSQL_LONG_QUERY_TIME 2 2 2
MYSQL_MAX_ALLOWED_PACKET 256M 256M 256M
MYSQL_MAX_CONNECT_ERRORS 100000 100000 100000
MYSQL_MAX_CONNECTIONS 50 50 50
MYSQL_MAX_HEAP_TABLE_SIZE 16M 16M 16M
MYSQL_NET_READ_TIMEOUT 90 90 90
MYSQL_NET_WRITE_TIMEOUT 90 90 90
MYSQL_OPTIMIZER_PRUNE_LEVEL 1 1 1
MYSQL_OPTIMIZER_SEARCH_DEPTH 62 62 62
MYSQL_PASSWORD
MYSQL_PERFORMANCE_SCHEMA OFF OFF OFF
MYSQL_PORT 3306 3306 3306
MYSQL_QUERY_CACHE_LIMIT 1M 1M 1M
MYSQL_QUERY_CACHE_MIN_RES_UNIT 2K 2K 2K
MYSQL_QUERY_CACHE_SIZE 128M 128M 128M
MYSQL_QUERY_CACHE_TYPE ON ON ON
MYSQL_RELAY_LOG_RECOVERY 0 0 0
MYSQL_ROOT_PASSWORD
MYSQL_SLOW_QUERY_LOG 0 0 0
MYSQL_SORT_BUFFER_SIZE 2M 2M 2M
MYSQL_TABLE_DEFINITION_CACHE 400 400 400
MYSQL_TABLE_OPEN_CACHE 4096 4096 4096
MYSQL_THREAD_CACHE_SIZE 75 75 75
MYSQL_TMP_TABLE_SIZE 16M 16M 16M
MYSQL_USER
MYSQL_WAIT_TIMEOUT 420 420 420

"-" - Not available for this version

Performance Tuning Recommendations

  • Decrease the value of MYSQL_OPTIMIZER_SEARCH_DEPTH to 7-8 if you have many queries with more than 15 tables (source)

Orchestration Actions

Usage:

make COMMAND [params ...]
 
commands:
    import source=</path/to/dump.zip or http://example.com/url/to/dump.sql.gz> [db root_password host ignore="table1;table2;cache_%"] 
    backup filepath=</path/to/backup.sql.gz> [root_password host db nice ionice] 
    query query [db user password host] 
    query-silent query [db user password host] 
    query-root query [db root_password host]
    check-ready [root_password host max_try wait_seconds]  
    
default params values:
    user $MYSQL_USER
    password $MYSQL_PASSWORD
    db $MYSQL_DATABASE
    root_password $MYSQL_ROOT_PASSWORD
    host localhost
    max_try 1
    wait_seconds 1
    ignore ""
    ionice 7

Deployment

Deploy MariaDB to your own server via Wodby Wodby.