Giter Club home page Giter Club logo

mysql-container's Introduction

ローカル環境用のmysqlコンテナー構築手順

ローカル環境で開発刷る場合にはこのMySQLコンテナーを利用する

  1. githubからmysql-containerを取得
$ git clone [email protected]:ymsr5612/mysql-container.git
  1. docker images作成
$ docker build -t mysql-container .
  1. docker run
$ docker run -d --name mysql5.7-container -p 3336:3306 mysql-container
  1. docker log
$ docker logs mysql-container
  1. docker mysql command line client
$ docker run -it --link mysql5.7-container:mysql --rm mysql sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -umysqluser -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
  1. alias for local mysql
alias mydb='mysql -h127.0.0.1 -umysqluser --password=abc123$ --port=3336 '

mysql-container's People

Contributors

ymsrk 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.