Access to MySQL on Docker

How to access to MySQL on Docker.
Make sure docker container ID.

$ docker ps

The next, access to container with Bash.

$ docker exec -it <Container ID> bash
$ mysql -u root -p

You can execute MySQL command.

mysql> SHOW DATABASES;

関連記事