1 Use docker cp command to copy the file to the container .sql directory
docker cp /root/tables.sql /tmp/
2 into the interior of the container, to import database files sql
docker exec -it 容器id bash
mysql -uroot -ppassword
use database_name;
source /tmp/tables.sql;
show tables;
To