You maintain an app with MySQL and develop it on Docker. You have a dump file as .sql. Then, you want to run it.
$ docker cp hoge.sql [cotaier-id]:/hoge.sql
$ docker ps $ docker exec -it [container-id] /bin/bash
$ mysql -u root -p $ show databases; $ use [your_database_name]; $ show tables;
💡hint: if you use a rails app, the password and connection informations should be defined at
config/database.yml. Perhaps, it is actually written in
$ source hoge.sql