Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.
Learn more docker compose here
- Clone this repository
git clone [email protected]:fuadajip/dockercompose-mysql-phpmyadmin.git
- Change to directory
cd dockercompose-mysql-phpmyadmin
- Up the compose
docker-compose up -d
- Access phpmyadmin
your_ip:8183
Server: mysql
Username: root/user
Password: root/user
Before access phpmyadmin, we may need to edit the root password by follow this below step.
docker exec -it xxxxxx bash (xxxxxx is container id)
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'youpassword';
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'youpassword'
- Access mysql on terminal
docker exec -it mysql_container_name mysql -u root -p
PMA_ARBITRARY | when set to 1 connection to the arbitrary server will be allowed |
PPMA_HOST | define address/host name of the MySQL server |
PMA_PORT | define port of the MySQL server |