[Docker] 로컬에 MySQL 설치 합니다.

Cloud&Container/IaC 2021. 7. 14. 19:39

요즘 잘 되어 있는 container 기반으로 구성 하면 되지 않겠습니까?

 

version: '3.7'

services:
  db:
    image: mysql
    container_name: local-mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: local
      MYSQL_USER: henry
      MYSQL_PASSWORD: henry
      MYSQL_DATABASE: henry
    volumes:
      - ./data:/var/lib/mysql
    ports:
      - 3306:3306

  adminer:
    image: adminer
    restart: always
    ports:
      - 8888:8888

$ docker-compose up -d

이제 client tool 을 이용해서 접속해 보시면 됩니다. :)

: