F
F
FoxBoost2018-05-24 00:50:28
MySQL
FoxBoost, 2018-05-24 00:50:28

How to recreate MySQL database in docker-compose?

After deleting all docker containers and restarting via docker-compose, the old database remains, and I need to recreate it. How to remove it? This is how mysql is configured in the yaml file:
au_api_mysql:
image: mysql:5.7
restart: always
environment:
- MYSQL_ROOT_PASSWORD=typa_pass
- MYSQL_DATABASE=api_db2
- MYSQL_USER=api_user2
- MYSQL_PASSWORD=typa_pass2
- MYSQL_TCP_PORT=33060
- TZ=Europe/Moscow
volumes:
- db_data:/var/lib/mysql
ports:
- "33060:33060"
command:
- --character-set-server=utf8
- --collation-server=utf8_unicode_ci

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Tsvetkov, 2018-05-24
@FoxBoost

Delete what is in db_data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question