Add basic docker-compose setup
The setup contains a three node master-slave cluster with both readwritesplit and readconnroute. Removed the duplication of the configuration files in the README and provided links instead.
This commit is contained in:
10
docker/sql/master/users.sql
Normal file
10
docker/sql/master/users.sql
Normal file
@ -0,0 +1,10 @@
|
||||
RESET MASTER;
|
||||
CREATE DATABASE test;
|
||||
|
||||
CREATE USER 'maxuser'@'127.0.0.1' IDENTIFIED BY 'maxpwd';
|
||||
CREATE USER 'maxuser'@'%' IDENTIFIED BY 'maxpwd';
|
||||
GRANT ALL ON *.* TO 'maxuser'@'127.0.0.1' WITH GRANT OPTION;
|
||||
GRANT ALL ON *.* TO 'maxuser'@'%' WITH GRANT OPTION;
|
||||
|
||||
SET GLOBAL max_connections=10000;
|
||||
SET GLOBAL gtid_strict_mode=ON;
|
4
docker/sql/slave/replication.sql
Normal file
4
docker/sql/slave/replication.sql
Normal file
@ -0,0 +1,4 @@
|
||||
CHANGE MASTER TO MASTER_HOST='master', MASTER_PORT=3306, MASTER_USER='maxuser', MASTER_PASSWORD='maxpwd', MASTER_LOG_POS=4, MASTER_LOG_FILE='mariadb-bin.000001', MASTER_CONNECT_RETRY=1;
|
||||
START SLAVE;
|
||||
SET GLOBAL max_connections=10000;
|
||||
SET GLOBAL gtid_strict_mode=ON;
|
7
docker/sql/users.sql
Normal file
7
docker/sql/users.sql
Normal file
@ -0,0 +1,7 @@
|
||||
RESET MASTER;
|
||||
|
||||
CREATE USER 'maxuser'@'127.0.0.1' IDENTIFIED BY 'maxpwd';
|
||||
GRANT ALL ON *.* TO 'maxuser'@'127.0.0.1' WITH GRANT OPTION;
|
||||
|
||||
CREATE USER 'maxuser'@'%' IDENTIFIED BY 'maxpwd';
|
||||
GRANT ALL ON *.* TO 'maxuser'@'%' WITH GRANT OPTION;
|
Reference in New Issue
Block a user