Created
July 24, 2017 03:11
-
-
Save chihirokaasan/2a4c5e484ef0fe5f86486979a443b832 to your computer and use it in GitHub Desktop.
Dockerのコンテナにアクセス
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -it your-container-name bash | |
#例 MySQLのDockerコンテナにログインしてMySQLにアクセス | |
docker exec -it your-container-name bash | |
root@0your-container-name:/# mysql -u root -p | |
Enter password: | |
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 25 | |
Server version: 5.7.18 MySQL Community Server (GPL) | |
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. | |
Oracle is a registered trademark of Oracle Corporation and/or its | |
affiliates. Other names may be trademarks of their respective | |
owners. | |
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. | |
mysql> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment