Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds functionality of phpmyadmin #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions innodb-cluster/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-compose.yml.bak.old
5 changes: 0 additions & 5 deletions innodb-cluster/dbwebapp.env

This file was deleted.

62 changes: 44 additions & 18 deletions innodb-cluster/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,51 +3,77 @@ services:
mysql-server-1:
env_file:
- mysql-server.env
image: mysql/mysql-server:8.0.12
image: mysql/mysql-server:8.0.13
ports:
- "3301:3306"
command: ["mysqld","--server_id=1","--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON","--log_bin","--log_slave_updates=ON","--master_info_repository=TABLE","--relay_log_info_repository=TABLE","--transaction_write_set_extraction=XXHASH64","--user=mysql","--skip-host-cache","--skip-name-resolve", "--default_authentication_plugin=mysql_native_password"]
healthcheck:
test: "exit 0"

mysql-server-2:
env_file:
- mysql-server.env
image: mysql/mysql-server:8.0.12
image: mysql/mysql-server:8.0.13
command: ["mysqld","--server_id=2","--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON","--log_bin","--log_slave_updates=ON","--master_info_repository=TABLE","--relay_log_info_repository=TABLE","--transaction_write_set_extraction=XXHASH64","--user=mysql","--skip-host-cache","--skip-name-resolve", "--default_authentication_plugin=mysql_native_password"]
ports:
- "3302:3306"
healthcheck:
test: "exit 0"

mysql-server-3:
env_file:
- mysql-server.env
image: mysql/mysql-server:8.0.12
image: mysql/mysql-server:8.0.13
command: ["mysqld","--server_id=3","--binlog_checksum=NONE","--gtid_mode=ON","--enforce_gtid_consistency=ON","--log_bin","--log_slave_updates=ON","--master_info_repository=TABLE","--relay_log_info_repository=TABLE","--transaction_write_set_extraction=XXHASH64","--user=mysql","--skip-host-cache","--skip-name-resolve", "--default_authentication_plugin=mysql_native_password"]
ports:
- "3303:3306"
healthcheck:
test: "exit 0"

mysql-shell:
env_file:
- mysql-shell.env
image: neumayer/mysql-shell-batch
image: bkandasa/mysql-shell-batch
volumes:
- ./scripts/:/scripts/
depends_on:
- mysql-server-1
- mysql-server-2
- mysql-server-3
mysql-server-1:
condition: service_healthy
mysql-server-2:
condition: service_healthy
mysql-server-3:
condition: service_healthy
healthcheck:
test: "exit 0"
restart: on-failure

mysql-router:
env_file:
- mysql-router.env
image: mysql/mysql-router:8.0
image: mysql/mysql-router:8.0.13
ports:
- "6446:6446"
depends_on:
- mysql-server-1
- mysql-server-2
- mysql-server-3
- mysql-shell
mysql-server-1:
condition: service_healthy
mysql-server-2:
condition: service_healthy
mysql-server-3:
condition: service_healthy
mysql-shell:
condition: service_healthy
restart: on-failure
dbwebapp:
env_file:
- dbwebapp.env
image: neumayer/dbwebapp
ports:
- "8080:8080"
phpmyadmin:
image: phpmyadmin
container_name: msr-phpmyadmin
depends_on:
- mysql-router
ports:
- 8181:80
env_file:
- phpmyadmin.env
environment:
PMA_HOST: mysql-router
PMA_PORT: 6446
MYSQL_USERNAME: root
MYSQL_ROOT_PASSWORD: mysql
5 changes: 5 additions & 0 deletions innodb-cluster/phpmyadmin.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DBUSER=abneet
DBPASS='Admin123$'
DBNAME=test
DBHOST=mysql-router
DBPORT=6446
6 changes: 3 additions & 3 deletions innodb-cluster/scripts/db.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
CREATE DATABASE dbwebappdb;
CREATE USER 'dbwebapp'@'%' IDENTIFIED BY 'dbwebapp';
GRANT ALL PRIVILEGES ON dbwebappdb.* TO 'dbwebapp'@'%';
CREATE DATABASE abneet;
CREATE USER 'abneet'@'%' IDENTIFIED BY 'Admin123$';
GRANT ALL PRIVILEGES ON *.* TO 'abneet'@'%';