phpMyAdmin in Docker

Updated: 16 November 2023

phpMyAdmin is available as a Docker image. The MySQL server connection parameters are provided when the container is instantiated.

For a remote MySQL server

docker run --name myadmin \
-e PMA_HOST=https://example.com \
-e PMA_PORT=3306 \
-e PMA_USER=user \
-e PMA_PASSWORD=password \
-p 8080:80 \
phpmyadmin/phpmyadmin

Browse to phpMyAdmin at http://localhost:8080

MySQL server running in a local Docker network some-network

docker run --name myadmin \
--network=some-network \
-e PMA_HOST=db \
-e PMA_PORT=3306 \
-p 8080:80 \
phpmyadmin/phpmyadmin

--network The docker network the phpMyAdmin container will join.

Leave a comment