This repository contains a docker-compose.yml
file to quickly set up and run MySQL with phpMyAdmin for database management.
- Docker installed on your system.
- Docker Compose installed.
- Clone this repository or copy the
mysql-docker-compose.yml
file to your project directory. - Open a terminal and navigate to the directory containing the
mysql-docker-compose.yml
file. - Run the following command to start the services:
docker compose -f mysql-docker-compose.yml up -d --build
- Access phpMyAdmin in your browser at http://localhost:8080.
- Use the following credentials to log in:
- Server:
mysql
- Username:
user
- Password:
root
- Server:
Below is an example of the phpmyadmin login page:
!!! If you see any error on phpmyadmin page, then reload the browser page, it will be fix !!!.
You can modify the mysql-docker-compose.yml
file to change the MySQL root password, database name, or phpMyAdmin port.
To stop and remove the containers, run:
docker compose -f mysql-docker-compose.yml down
services: mysql: image: mysql:8.0 container_name: mysql environment: MYSQL_ROOT_PASSWORD: example ports: - "3306:3306" volumes: - mysql_data:/var/lib/mysql phpmyadmin: image: phpmyadmin/phpmyadmin:latest container_name: phpmyadmin environment: PMA_HOST: mysql PMA_PORT: 3306 ports: - "8080:80" volumes: mysql_data:
This project is licensed under the MIT License.