I can’t figure out how to import a sql file into an already running mysql container. The original sql file is on the host machine and i copied it over like this:
docker cp database_schema.sql my-mysql:/database_schema.sql
I can then see it in the root dir on the container but when i try to import it I get a “No such file or directory”.
[jenkins@or1010050215222 ~]$ docker exec -i my-mysql ls | grep .sql
database_schema.sql
[jenkins@or1010050215222 ~]$ docker exec -i my-mysql mysql < database_schema.sql
-bash: database_schema.sql: No such file or directory
What am I doing wrong?
Thanks,
Shay