Giter Site home page Giter Site logo

mysql-sandbox's Introduction

mysql-sandbox

起動方法

0. 環境

Dockerが動く環境を用意する

1. Dockerイメージの作成

make build-image

2. 生成したイメージからコンテナの起動

make run-container

※このとき、データはボリュームへ永続化される。

データのクリーンアップ

remove-volumeにより、永続化データも削除する。

make stop-container remove-container remove-volume remove-image

コンテナに接続

稼働コンテナで任意のプロセス実行

docker container exec -it mysql-container /bin/bash

DBへの疎通確認

$ mysql -h localhost -u root -p -D sample --protocol=tcp
Enter password: my-secret-pw

mysql>

他の操作コマンド

他の操作コマンド

コンテナの状態を確認

稼働中のコンテナを確認

docker container ls

稼働していないコンテナも含めて確認

docker container ls -a

イメージ一覧を確認

docker images

ボリューム一覧を確認

docker volume ls

起動時のログを確認

$ docker container ls -a
$ docker logs <コンテナID>

スキーマ自動生成

tbls doc --rm-dist

mysql-sandbox's People

Contributors

negi524 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.