Skip to content

Commit 28c0216

Browse files
committed
Add MariaDB.
1 parent 6fa695d commit 28c0216

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

mariadb/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Enter the Container w/ Bash
2+
3+
`docker-compose exec --user root db /bin/bash`
4+
5+
# Enter the MySQL Shell
6+
7+
`docker-compose exec --user root db mysql -u root -p`
8+
9+
When prompted, enter `password` as the password.
10+
11+
# Create a DB
12+
13+
While inside the shell, run the following:
14+
15+
```
16+
CREATE DATABASE mydatabase;
17+
```

mariadb/docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3'
2+
3+
services:
4+
db:
5+
image: mariadb:latest
6+
volumes:
7+
- dbdata:/var/lib/mysql
8+
restart: always
9+
ports:
10+
- 3306:3306
11+
environment:
12+
MYSQL_ROOT_PASSWORD: password
13+
14+
volumes:
15+
dbdata:

0 commit comments

Comments
 (0)