mattlord / docker-innodb-cluster Goto Github PK
View Code? Open in Web Editor NEWThis is an unofficial container for testing InnoDB clusters. This is for experimental and testing purposes only!
License: GNU General Public License v2.0
This is an unofficial container for testing InnoDB clusters. This is for experimental and testing purposes only!
License: GNU General Public License v2.0
Following command would not fail
docker run --name=mysqlgr1 --hostname=mysqlgr1 --network=grnet -e MYSQL_ROOT_PASSWORD=root -e BOOTSTRAP=1 -e GROUP_NAME="test" -itd mattalord/innodb-cluster
But GROUP_NAME
must be UUID4 only. Non-empty string doesn't fail boostrap, but should be.
docker-compose file for cluster:
version: '3'
services:
mysql-initiator:
image: "mattalord/innodb-cluster"
restart: always
environment:
- "MYSQL_DATABASE=funcs"
- "MYSQL_ROOT_PASSWORD=root"
- "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
- "BOOTSTRAP=1"
volumes:
- ./data/mysql-initiator:/var/lib/mysql
mysql-2:
image: "mattalord/innodb-cluster"
restart: always
environment:
- "MYSQL_DATABASE=funcs"
- "MYSQL_ROOT_PASSWORD=root"
- "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
- "GROUP_SEEDS=mysql-initiator:6606"
volumes:
- ./data/mysql-member-2:/var/lib/mysql
depends_on:
- mysql-initiator
mysql-3:
image: "mattalord/innodb-cluster"
restart: always
environment:
- "MYSQL_DATABASE=funcs"
- "MYSQL_ROOT_PASSWORD=root"
- "GROUP_NAME=C55153C1-1574-4972-BF06-7332D6AD46A7"
- "GROUP_SEEDS=mysql-initiator:6606"
volumes:
- ./data/mysql-member-3:/var/lib/mysql
depends_on:
- mysql-initiator
router:
image: "mattalord/innodb-cluster"
restart: always
ports:
- "3306:3306"
- "6446-6447:6446-6447"
- "6606:6606"
- "33060:33060"
volumes:
- ./data/mysql-router:/var/lib/mysqlrouter
- ./data/mysql-router-data:/var/lib/mysql
depends_on:
- mysql-initiator
- mysql-2
- mysql-3
environment:
- "NODE_TYPE=router"
- "MYSQL_ROOT_PASSWORD=root"
- "MYSQL_HOST=mysql-initiator"
Initial provisioning works fine, but when deployment gets suspended or restarted. Cluster provisioning fails.
After running compose file child nodes are not joining the cluster. child nodes are staying in starting stage for long time and restarting.
Log showing:
inno_mysql-2.1.u9eabv1l8sqm@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606,mysql-2:6606,mysql-3:6606 as seeds
inno_mysql-2.1.u9eabv1l8sqm@node2 | Initializing database
inno_mysql-2.1.u9eabv1l8sqm@node2 | Database initialized
inno_mysql-2.1.u9eabv1l8sqm@node2 | MySQL init process in progress...
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.u9eabv1l8sqm@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.u9eabv1l8sqm@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.u9eabv1l8sqm@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.u9eabv1l8sqm@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.u9eabv1l8sqm@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.u9eabv1l8sqm@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606 as seeds
inno_mysql-2.1.vt7ebm1wknni@node2 | Initializing database
inno_mysql-2.1.vt7ebm1wknni@node2 | Database initialized
inno_mysql-2.1.vt7ebm1wknni@node2 | MySQL init process in progress...
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.vt7ebm1wknni@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.vt7ebm1wknni@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.vt7ebm1wknni@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.vt7ebm1wknni@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.vt7ebm1wknni@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.vt7ebm1wknni@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606,mysql-2:6606,mysql-3:6606 as seeds
inno_mysql-2.1.3cpv7igk0vnk@node2 | Initializing database
inno_mysql-2.1.3cpv7igk0vnk@node2 | Database initialized
inno_mysql-2.1.3cpv7igk0vnk@node2 | MySQL init process in progress...
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.3cpv7igk0vnk@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.3cpv7igk0vnk@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.3cpv7igk0vnk@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.3cpv7igk0vnk@node2 |
inno_mysql-2.1.ub63qcvutmo3@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606,mysql-2:6606,mysql-3:6606 as seeds
inno_mysql-2.1.ub63qcvutmo3@node2 | Initializing database
inno_mysql-2.1.7qd7vz1mrj8q@node2 | info: attempting to join the C55153C1-1574-4972-BF06-7332D6AD46A7 group using mysql-1:6606 as seeds
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Initializing database
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Database initialized
inno_mysql-2.1.7qd7vz1mrj8q@node2 | MySQL init process in progress...
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Note (Code 1008): Can't drop database 'test'; database doesn't exist
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
inno_mysql-2.1.7qd7vz1mrj8q@node2 | /entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
inno_mysql-2.1.7qd7vz1mrj8q@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | mysql: [Warning] Using a password on the command line interface can be insecure.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Note (Code 1759): Sending passwords in plain text without SSL/TLS is extremely insecure.
inno_mysql-2.1.7qd7vz1mrj8q@node2 | Note (Code 1760): Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
inno_mysql-2.1.7qd7vz1mrj8q@node2 | MySQL init process done. Ready for start up.
inno_mysql-2.1.7qd7vz1mrj8q@node2 |
Router provisioning fails silently if replication group members table is empty.
docker ps -a
(router instance process exited)Setting up a new router instance...
all is in the title i don't understand i have no log in my container
this is what i seen in my pma
mysqli::real_connect(): (HY000/2003): Can't connect to remote MySQL server for client '0.0.0.0:6446'
Hi Mattlord,
In the file setup_cluster.bat when you run the containers you are mapping the external port 339X (where X = 1, 2 and 3) to the same number, when it should be mapped to port 3306 inside the container.
For example, in line 7 we can see:
docker run --rm --name=mysqlgr1 --hostname=mysqlgr1 --network=grnet -p 3391:3391 -e MYSQL_ROOT_PASSWORD=root -e BOOTSTRAP=1 -e GROUP_NAME="92bb4382-3bd1-11e7-a919-92ebcb67fe33" -itd mattalord/innodb-cluster
i.e.
-p 3391:3391
where it should be
-p 3391:3306
to my humble opinion.
The same would apply to lines 11 and 15.
Not sure if this small mistake happened also in other files, as I am testing it just on windows.
Thank you for this great bed to test and play with innoDB cluster.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.