Menu

Laravel Docker: Install phpMyAdmin with a MySQL Database
📰

Laravel Docker: Install phpMyAdmin with a MySQL Database

DEV Community: docker·Muhammad Yasir Amin·3 days ago
#3TiCUETU
#devtodocker#devto#dev#phpmyadmin#laravel
Reading 0:00
15s threshold

To add phpMyAdmin to a Laravel Docker setup, add a phpmyadmin service to your docker-compose.yml that uses the official phpmyadmin image, point it at your MySQL service with PMA_HOST , publish a local port such as 8080, and start the stack. You can then open http://localhost:8080 and browse your Laravel tables. This guide shows the full compose file and how to keep it safe.

phpMyAdmin is a web interface for MySQL and MariaDB. In development it saves you from typing SQL for quick checks of migrations, seeders and queued job tables.

What do I need before I start?

Docker and Docker Compose installed.

A Laravel 13 project (PHP 8.3 or newer) already running in containers with a MySQL service. If you do not have that yet, start from a compose file with an app service and a mysql service.

The database credentials your Laravel .env uses.

Step 1: What does the compose file look like?

Here is a minimal file with a database and phpMyAdmin.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.