Skip to content

Commit 386b4e7

Browse files
committed
setup
0 parents  commit 386b4e7

File tree

2 files changed

+76
-0
lines changed

2 files changed

+76
-0
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# DOCKER COMPOSE PHPMYADMIN MYSQL
2+
3+
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.
4+
5+
Learn more docker compose <a href="https://docs.docker.com/compose/overview/" target="_blank">here</a>
6+
7+
## PLayground
8+
9+
1. Clone this repository
10+
11+
git clone git@github.com:fuadajip/dockercompose-mysql-phpmyadmin.git
12+
13+
2. Change to directory
14+
15+
cd dockercompose-mysql-phpmyadmin
16+
17+
3. Up the compose
18+
19+
docker-compose up -d
20+
21+
4. Access phpmyadmin
22+
23+
your_ip:8183
24+
Server: mysql
25+
Username: root/user
26+
Password: root/user
27+
28+
5. Access mysql on terminal
29+
30+
docker exec -it mysql_container_name mysql -u root -p
31+
32+
## Docker phpmyadmin ENV
33+
<table>
34+
<tr>
35+
<td>PMA_ARBITRARY </td>
36+
<td>when set to 1 connection to the arbitrary server will be allowed</td>
37+
</tr>
38+
<tr>
39+
<td>PPMA_HOST </td>
40+
<td>define address/host name of the MySQL server</td>
41+
</tr>
42+
<tr>
43+
<td>PMA_PORT </td>
44+
<td> define port of the MySQL server</td>
45+
</tr>
46+
</table>
47+
48+
## For more information about phpmyadmin image
49+
<a href="https://hub.docker.com/r/phpmyadmin/phpmyadmin/" target="_blank">READ HERE</a>
50+
51+
## For more information about mysql ENV
52+
<a href="https://hub.docker.com/_/mysql/" target="_blank">READ HERE</a>

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version : '3'
2+
3+
services:
4+
mysql:
5+
image: mysql:latest
6+
container_name: dev_mysql
7+
environment:
8+
MYSQL_USER: user
9+
MYSQL_PASSWORD: user
10+
MYSQL_ROOT_PASSWORD: root
11+
MYSQL_DATABASE: default_schema
12+
13+
phpmyadmin:
14+
image: phpmyadmin/phpmyadmin
15+
container_name: dev_pma
16+
links:
17+
- mysql
18+
environment:
19+
PMA_HOST: mysql
20+
PMA_PORT: 3306
21+
PMA_ARBITRARY: 1
22+
restart: always
23+
ports:
24+
- 8183:80

0 commit comments

Comments
 (0)