--Connecting host and container standard output
--Check CONTAINER ID or NAMES with ps option
% docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
--Connect standard output with it option --- i: Connect standard I / O of host to container --- t: Connect the standard input / output of the container to the container
% docker exec -it [CONTAINER ID or NAMES] bash
--Login to mysql (check pass in database.yml) --- u: User specification --- p: Use password
% mysql -u root -p
that's all
Recommended Posts