
mobiletech/mariadb-galeraWSREP_NODE_ADDRESS - IP or domain of host interface eg WSREP_NODE_ADDRESS=10.0.0.1WSREP_CLUSTER_ADDRESS - List of cluster nodes and ports eg WSREP_CLUSTER_ADDRESS=gcomm://10.0.0.1:4567,10.0.0.2:4567,10.0.0.3:4567WSREP_CLUSTER_NAME - Default my_wsrep_clusterWSREP_NODE_NAME - Defaults to the container hostname. You'll want to set this
to something that doesn't change.Garbd is available. Just specify garbd as the command.
docker run -d --net host --name galera-garbd \ -e WSREP_CLUSTER_ADDRESS=$WSREP_CLUSTER_ADDRESS \ mobiletech/mariadb-galera \ garbd
Node 1:
docker run -d --net host --name galera \ -e WSREP_NODE_ADDRESS=$WSREP_NODE_ADDRESS \ -e WSREP_CLUSTER_ADDRESS=$WSREP_CLUSTER_ADDRESS \ -e MYSQL_ROOT_PASSWORD={{ mysql_root_password }} \ -p 3306:3306 \ -p 4567:4567/udp \ -p 4567-4568:4567-4568 \ -p 4444:4444 \ -v /mnt/data/galera.service/mysql:/var/lib/mysql:Z \ mobiletech/mariadb-galera \ mysqld \ --wsrep-new-cluster
Node 2-N:
Create empty mysql dir to skip database initialisation. (Kludge!)
mkdir -p /mnt/data/galera.service/mysql/mysql
Start the container normally (without --wsrep-new-cluster).
docker run -d --net host --name galera \ -e WSREP_NODE_ADDRESS=$WSREP_NODE_ADDRESS \ -e WSREP_CLUSTER_ADDRESS=$WSREP_CLUSTER_ADDRESS \ -p 3306:3306 \ -p 4567:4567/udp \ -p 4567-4568:4567-4568 \ -p 4444:4444 \ -v /mnt/data/galera.service/mysql:/var/lib/mysql:Z \ mobiletech/mariadb-galera \ mysqld
Recovery when quorum is lost is fairly simple:
First, stop on all nodes. Eg (if using a Systemd unit to run Galera):
systemctl stop galera.service
Secondly, start node with most complete / recent data set with --wsrep-new-cluster argument. EG:
docker run -d --net host --name galera-init \ -e WSREP_NODE_ADDRESS=$WSREP_NODE_ADDRESS \ -e WSREP_CLUSTER_ADDRESS=$WSREP_CLUSTER_ADDRESS \ -e MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD \ -p 3307:3306 \ -p 4567:4567/udp \ -p 4567-4568:4567-4568 \ -p 4444:4444 \ -v /mnt/data/galera.service/mysql:/var/lib/mysql:Z \ mobiletech/mariadb-galera \ mysqld \ --wsrep-new-cluster
Finally, bring up other nodes normally. Eg. (Systemd example)
systemctl start galera.service

manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务