Arms crossed picture of James Auble
phpmyadmin login screen

Add PhpMyAdmin to Laravel Sail Container

PublishedFeb 27th, 2022

I’ve been told that many Laravel users choose to use a non-browser-based app for administering their Mysql databases.

But maybe you’re comfortable with PhpMyAdmin and don’t want to switch?

No big deal! I got you!


  1. If your Laravel Sail container is already running, bring it down. From your project root run:

.vendor/bin/sail down and wait for it to complete and return you to do the command line.

2. In your project root, find and open up docker-compose.yml and within the services block add the phpmyadmin service:

    image: phpmyadmin/phpmyadmin
      - mysql:mysql
      - 8080:80
      PMA_HOST: mysql
      - sail

Indentation is critical in YAML files, so make sure it lines up with the mysql service. Save the file.

3. Go back to the command line and bring back up your Sail container with:

./vendor/bin/sail up

4. In your browser, navigate to localhost:8080 and phpmyadmin should load. The default user:pass for my Sail installation was sail:password, so you can try logging in with that.

Hope that works for you!

Need a web developer?

Contact Me
Back to Blog
Scrolldown Icon