#395 Slaves are using empty MySQL server, master is using the vanilla one with a simple dump.

pull/419/head
Andrei-Adnan Ismail 11 years ago
parent a93bf66632
commit 9313eabcdb

@ -0,0 +1,6 @@
# The only purpose for which this image exists is to add ProxySQL-relevant
# labels to it.
FROM mysql:latest
LABEL vendor=proxysql\
com.proxysql.type=mysql

@ -1,12 +0,0 @@
# We are creating a custom Dockerfile for MySQL as there is no easy way to
# move a file from host into the container. In our case, it's schema.sql
# There is a proposed improvement to "docker cp" but it's still being
# discussed (https://github.com/docker/docker/issues/5846).
FROM mysql:latest
LABEL vendor=proxysql\
com.proxysql.type=mysql
ADD ./schema.sql /tmp/
ADD ./import_schema.sh /tmp/
ADD ./my.cnf /tmp/

@ -1,18 +0,0 @@
[mysqld]
innodb_file_per_table
innodb_flush_log_at_trx_commit=2
query_cache_size = 0
sync_binlog = 0
log_bin
binlog_format = MIXED
gtid_mode = ON
log-slave-updates
enforce-gtid-consistency
expire_logs_days = 3
max_binlog_size = 100M
bind_address = 0.0.0.0
max_connections = 5000
skip_name_resolve
[mysqld_safe]
open_files_limit = 102400

@ -1,2 +0,0 @@
cat /tmp/schema.sql | mysql -h 127.0.0.1 -u root -proot
cat /tmp/my.cnf | sed -e "s/XXXX/$MYSQL_SERVER_ID/" > /etc/mysql/conf.d/my.cnf

@ -1,21 +0,0 @@
DROP DATABASE IF EXISTS test;
CREATE DATABASE test;
# Used by monitoring module for connection health
CREATE USER monitor@'%' IDENTIFIED BY 'monitor';
CREATE USER john@'%' IDENTIFIED BY 'doe';
CREATE USER danny@'%' IDENTIFIED BY 'white';
GRANT ALL PRIVILEGES ON test.* TO 'monitor'@'%';
GRANT ALL PRIVILEGES ON test.* TO 'john'@'%';
GRANT ALL PRIVILEGES ON test.* TO 'danny'@'%';
FLUSH PRIVILEGES;
USE test;
CREATE TABLE strings(value LONGTEXT);
INSERT INTO strings(value) VALUES('a');
INSERT INTO strings(value) VALUES('ab');
INSERT INTO strings(value) VALUES('abc');
INSERT INTO strings(value) VALUES('abcd');

@ -29,7 +29,7 @@ proxysql:
"vendor": "proxysql"
backend1hostgroup0:
image: proxysql:mysql-simple-dump-replication
image: proxysql:mysql-simple-dump
environment:
MYSQL_ROOT_PASSWORD: root
expose:
@ -46,7 +46,7 @@ backend1hostgroup0:
- ./master-conf.d:/etc/mysql/conf.d
backend1hostgroup1:
image: proxysql:mysql-simple-dump-replication
image: proxysql:mysql-empty
environment:
MYSQL_ROOT_PASSWORD: root
links:
@ -65,7 +65,7 @@ backend1hostgroup1:
- ./slave1-conf.d:/etc/mysql/conf.d
backend2hostgroup1:
image: proxysql:mysql-simple-dump-replication
image: proxysql:mysql-empty
environment:
MYSQL_ROOT_PASSWORD: root
links:
@ -84,7 +84,7 @@ backend2hostgroup1:
- ./slave2-conf.d:/etc/mysql/conf.d
backend3hostgroup1:
image: proxysql:mysql-simple-dump-replication
image: proxysql:mysql-empty
environment:
MYSQL_ROOT_PASSWORD: root
links:
@ -103,7 +103,7 @@ backend3hostgroup1:
- ./slave3-conf.d:/etc/mysql/conf.d
backend4hostgroup1:
image: proxysql:mysql-simple-dump-replication
image: proxysql:mysql-empty
environment:
MYSQL_ROOT_PASSWORD: root
links:

Loading…
Cancel
Save