0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Docker ComposeでMySQLとphpMyAdmin

Posted at
docker-compose.yml
version: '3'

services:
  mysql_server:
    image: mysql
    container_name: mysql_container
    environment:
      MYSQL_ROOT_PASSWORD: root
      TZ: 'Asia/Tokyo'
    volumes:
      - ./docker/db/data:/var/lib/mysql  
      - ./docker/db/my.cnf:/etc/mysql/conf.d/my.cnf
      - ./docker/db/sql:/docker-entrypoint-initdb.d
    ports:
      - "3306:3306"
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
  phpmyadmin_server:
    image: phpmyadmin
    container_name: phpmyadmin_container
    depends_on:
      - mysql_server
    environment:
      - PMA_ARBITRARY=1
      - PMA_HOSTS='mysql_server'
    ports:
      - "8080:80"
    volumes:
      - ./docker/phpmyadmin/sessions:/sessions

http://localhost:8080/にて
サーバ: mysql_server
ユーザ名: root
パスワード: root

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?