MXS-1300: Fix test server creation

Before creating the users, the master will do a RESET MASTER to remove the
automatically generated binlogs. The servers should now start a lot faster
since they no longer need to replicate the large amounts of data that were
in these generated binlogs.
This commit is contained in:
Markus Mäkelä
2017-07-11 16:12:54 +03:00
parent 16ed95d865
commit 4dcefed974
3 changed files with 6 additions and 5 deletions

View File

@ -1,7 +1,7 @@
version: '2' version: '2'
services: services:
server1: server1:
image: mariadb:10.0 image: mariadb:10.1
network_mode: "host" network_mode: "host"
environment: environment:
MYSQL_ALLOW_EMPTY_PASSWORD: Y MYSQL_ALLOW_EMPTY_PASSWORD: Y
@ -10,7 +10,7 @@ services:
command: mysqld --log-bin=binlog --binlog-format=ROW --server-id=3000 --port=3000 --log-slave-updates command: mysqld --log-bin=binlog --binlog-format=ROW --server-id=3000 --port=3000 --log-slave-updates
server2: server2:
image: mariadb:10.0 image: mariadb:10.1
network_mode: "host" network_mode: "host"
depends_on: depends_on:
- server1 - server1
@ -21,7 +21,7 @@ services:
command: mysqld --log-bin=binlog --binlog-format=ROW --server-id=3001 --port=3001 --log-slave-updates command: mysqld --log-bin=binlog --binlog-format=ROW --server-id=3001 --port=3001 --log-slave-updates
server3: server3:
image: mariadb:10.0 image: mariadb:10.1
network_mode: "host" network_mode: "host"
depends_on: depends_on:
- server1 - server1
@ -32,7 +32,7 @@ services:
command: mysqld --log-bin=binlog --binlog-format=ROW --server-id=3002 --port=3002 --log-slave-updates command: mysqld --log-bin=binlog --binlog-format=ROW --server-id=3002 --port=3002 --log-slave-updates
server4: server4:
image: mariadb:10.0 image: mariadb:10.1
network_mode: "host" network_mode: "host"
depends_on: depends_on:
- server1 - server1

View File

@ -1,3 +1,4 @@
RESET MASTER;
CREATE DATABASE test; CREATE DATABASE test;
CREATE USER 'maxuser'@'127.0.0.1' IDENTIFIED BY 'maxpwd'; CREATE USER 'maxuser'@'127.0.0.1' IDENTIFIED BY 'maxpwd';

View File

@ -1,3 +1,3 @@
CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3000, MASTER_USER='maxuser', MASTER_PASSWORD='maxpwd', MASTER_LOG_POS=4, MASTER_CONNECT_RETRY=1; CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=3000, MASTER_USER='maxuser', MASTER_PASSWORD='maxpwd', MASTER_LOG_POS=4, MASTER_LOG_FILE='binlog.000001', MASTER_CONNECT_RETRY=1;
START SLAVE; START SLAVE;
SET GLOBAL max_connections=10000; SET GLOBAL max_connections=10000;