Skip to content

sumaiazaman/db-adminer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

🐳 MySQL + Adminer via Docker

A minimal, production-ready Docker setup to run MySQL 8 and Adminer locally — with no port conflicts, large file upload support, and full compatibility with existing Laravel projects.


📦 What's Inside

Service Image Port
MySQL 8 mysql:8.0 3307 (avoids conflict with Laravel Herd)
Adminer adminer 8080

🚀 Quick Start

# 1. Clone the repo
git clone https://github.com/sumaiazaman/db-adminer.git
cd db-adminer

# 2. Start containers
docker compose up -d

# 3. Open Adminer
open http://localhost:8080

🔐 Adminer Login Credentials

Field Value
System MySQL
Server db
Username company_user
Password user@pass!
Database company_db

⚙️ Connect Your Existing Laravel Project

Update your .env file:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3307
DB_DATABASE=company_db
DB_USERNAME=company_user
DB_PASSWORD=user@pass!

Then clear Laravel config cache:

php artisan config:clear
php artisan cache:clear

📁 Project Structure

db-adminer/
├── docker-compose.yml        # MySQL + Adminer services
└── php-config/
    └── uploads.ini           # PHP upload limits (512M)

🛠️ Common Issues & Fixes

Port 3306 already in use (Laravel Herd conflict)

Docker MySQL is mapped to 3307 — set DB_PORT=3307 in your .env.

Large SQL file upload fails in Adminer

Already handled via php-config/uploads.ini:

upload_max_filesize = 512M
post_max_size = 512M

MySQL 8 auth error with Laravel/PHP

Already fixed in docker-compose.yml:

command: --default-authentication-plugin=mysql_native_password

Apple Silicon (M1/M2/M3) performance warning

mysql:8.0 runs natively on ARM64 — no platform: linux/amd64 needed.


🛑 Stop Containers

docker compose down

📄 License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors