parent
6fa695df58
commit
28c02163b6
@ -0,0 +1,17 @@
|
||||
# Enter the Container w/ Bash
|
||||
|
||||
`docker-compose exec --user root db /bin/bash`
|
||||
|
||||
# Enter the MySQL Shell
|
||||
|
||||
`docker-compose exec --user root db mysql -u root -p`
|
||||
|
||||
When prompted, enter `password` as the password.
|
||||
|
||||
# Create a DB
|
||||
|
||||
While inside the shell, run the following:
|
||||
|
||||
```
|
||||
CREATE DATABASE mydatabase;
|
||||
```
|
@ -0,0 +1,15 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mariadb:latest
|
||||
volumes:
|
||||
- dbdata:/var/lib/mysql
|
||||
restart: always
|
||||
ports:
|
||||
- 3306:3306
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
|
||||
volumes:
|
||||
dbdata:
|
Loading…
Reference in new issue