mariadb:
image: mariadb:10.1.30
ports:
- 3306:3306
restart: always
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=newdb
- MYSQL_USER=user1
- MYSQL_PASSWORD=pass
- MYSQL_SCRIPT=
CREATE USER 'user2' IDENTIFIED BY 'pass2';
GRANT ALL PRIVILEGES ON newdb.* To 'user2' IDENTIFIED BY 'pass2';