Setting up and Using MySQL as a Container via Docker Compose
referbruv.com › blog › postsMay 26, 2020 · > docker exec -it mysql-server_db_1 mysql -h localhost -P 3306 -u root -pabcd@1234 Here mysql-server_db_1 is the name of the service Docker creates when it runs the docker-compose file. Once this is executed, we have our terminal connected to the MySQL CLI and we are ready to run SQL commands over the MySQL server running inside the container.