Docker: run phpMyAdmin to connect to any MySQL server
docker run command to start phpMyAdmin with PMA_ARBITRARY=1.
To quickly get a phpMyAdmin interface able to connect to any MySQL server, run the official image in Docker.
docker run --name myadmin -d -e PMA_ARBITRARY=1 -p 8080:80 phpmyadmin/phpmyadmin
What the command does
| Item | Purpose |
|---|---|
--name myadmin |
container name |
-d |
run in the background |
-e PMA_ARBITRARY=1 |
shows a "Server" field on the login page, so any MySQL host can be targeted |
-p 8080:80 |
publishes container port 80 on host port 8080 |
The interface is then available at http://localhost:8080.
Notes
- Host port
8080is an example; adjust it. - This setup is meant for a test workstation: do not expose it on an untrusted network.