# Running mysql command in docker container

According to the `docker-compose.yml`, this directory is mounted as `/sql`.

To execute the sqls to a running container, do the following.

```
docker exec webapp_mysql_1 sh -c 'MYSQL_PWD=password mysql -uroot < /sql/create_database.sql'
docker exec webapp_mysql_1 sh -c 'MYSQL_PWD=password mysql -uroot -Disuchannel < /sql/schema.sql'
docker exec webapp_mysql_1 sh -c 'MYSQL_PWD=password mysql -uroot -Disuchannel < /sql/initial_data.sql'
```

# Running mysql command in docker container

According to the `docker-compose.yml`, this directory is mounted as `/sql`.

To execute the sqls to a running container, do the following.

```
docker exec webapp_mysql_1 sh -c 'MYSQL_PWD=password mysql -uroot < /sql/create_database.sql'
docker exec webapp_mysql_1 sh -c 'MYSQL_PWD=password mysql -uroot -Disuchannel < /sql/schema.sql'
docker exec webapp_mysql_1 sh -c 'MYSQL_PWD=password mysql -uroot -Disuchannel --default-character-set=utf8 < /sql/initial_data.sql'
```

Add --default-character-set=utf8 to import initial data
Add  --default-character-set=utf8 to import initial data
