0

I have install mysql on my mac os and it is running on port 3306 locally and phpmyadmin container running on 80(host port 8080).

Also, I have tried with running both mysql and phpmyadmin using docker,there it was working. I used below docker compose file.

version: '3.1'
services:
  db:
    image: mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: test_db
    ports:
      - "3308:3306"
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    restart: always
    environment:
      PMA_HOST: db
      PMA_USER: root
      PMA_PASSWORD: root
    ports:
      - "8080:80"

Now I am wondered is there any way to connect docker phpmyadmin container to local mysql ?

Avinash
  • 123
  • 1
  • 7

0 Answers0