Created
June 5, 2018 22:29
-
-
Save vmari/7ed843064d2184c25521b5a65231c2f6 to your computer and use it in GitHub Desktop.
Run phpmyadmin with docker through UNIX sockets on localhost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run phpmyadmin with docker on your localhost (minimal configuration) | |
docker run -d -p 8080:80 \ | |
--name phpmyadmin \ | |
-e "PMA_HOST=localhost" \ | |
-v /var/run/mysqld/mysqld.sock:/tmp/mysql.sock \ | |
phpmyadmin/phpmyadmin | |
# if you want autologin replace PMA_USER and PMA_PASSWORD | |
# warning: you're opening the database to the world if you're not behind a firewall | |
docker run -d -p 8080:80 \ | |
--name phpmyadmin \ | |
-e "PMA_HOST=localhost" \ | |
-e "PMA_USER=root" \ | |
-e "PMA_PASSWORD=1234" \ | |
-v /var/run/mysqld/mysqld.sock:/tmp/mysql.sock \ | |
phpmyadmin/phpmyadmin | |
# Once created you can stop, run and remove the container as you want, it's yours. | |
docker stop phpmyadmin | |
docker start phpmyadmin | |
docker rm phpmyadmin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you, it helps a lot!