docker-compose.yml
version: '3.8'
services:
mariadb:
image: mariadb
restart: unless-stopped
ports:
- 3306:3306
environment:
TZ: Asia/Shanghai
MARIADB_ROOT_PASSWORD: mariadb
MARIADB_DATABASE: mariadb
MARIADB_USER: mariadb
MARIADB_PASSWORD: mariadb
volumes:
- ./data:/var/lib/mysql
# - ./mariadb.cnf:/etc/mysql/mariadb.cnf
# - ./my.cnf:/etc/mysql/my.cnf