mirror of https://github.com/sysown/proxysql
#395 Slaves are using empty MySQL server, master is using the vanilla one with a simple dump.
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');
|
||||
Loading…
Reference in new issue