Skip to content

Instantly share code, notes, and snippets.

@chihirokaasan
Created July 24, 2017 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chihirokaasan/2a4c5e484ef0fe5f86486979a443b832 to your computer and use it in GitHub Desktop.
Save chihirokaasan/2a4c5e484ef0fe5f86486979a443b832 to your computer and use it in GitHub Desktop.
Dockerのコンテナにアクセス
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