专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像 官方专业版轩辕镜像 官方专业版官方专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题
其他
关于我们网站地图

官方QQ群: 1072982923

inspectormeow/mariadb-galera Docker 镜像 - 轩辕镜像 | Docker 镜像高效稳定拉取服务

热门搜索:openclaw🔥nginx🔥redis🔥mysqlopenjdkcursorweb2apimemgraphzabbixetcdubuntucorednsjdk
mariadb-galera
inspectormeow/mariadb-galera
自动构建
inspectormeow
just...
下载次数: 0状态:自动构建维护者:inspectormeow仓库类型:镜像最近更新:10 年前
轩辕镜像,快一点,稳很多。点击查看
镜像简介版本下载
轩辕镜像,快一点,稳很多。点击查看

Percona/Galera Docker Image

This docker image contains Percona with the galera extentions and XtraBackup installed.

If etcd is available it will automatically cluster itself with Galera and the XtraBackup SST.

Fetching

$ git clone [***]
cd docker-percona_galera

Building

$ docker build -t paulczar/percona-galera .

Running

Just a database

MySQL root user is available from localhost without a password. a default user/pass pair of admin/admin is pulled in from environment variables which has root like perms. set it to something sensible.

 $ docker run -d -e MYSQL_USER=admin -e MYSQL_PASS=lolznopass paulczar/percona-galera
  ==> $HOST not set.  booting mysql without clustering.
  ==> An empty or uninitialized database is detected in /var/lib/mysql
==> Creating database...
==> Done!
==> starting mysql in order to set up passwords
==> sleeping for 20 seconds, then testing if DB is up
*** 16:22:26 mysqld_safe Logging to '/var/log/mysql/error.log'.
*** 16:22:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
*** 16:22:26 mysqld_safe Skipping wsrep-recover for empty datadir: /var/lib/mysql
*** 16:22:26 mysqld_safe Assigning 00000000-0000-0000-0000-000000000000:-1 to wsrep_start_position
==> stopping mysql after setting up passwords
*** 16:22:47 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
*** 16:22:48 mysqld_safe Logging to '/var/log/mysql/error.log'.
*** 16:22:48 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
*** 16:22:48 mysqld_safe Skipping wsrep-recover for empty datadir: /var/lib/mysql
*** 16:22:48 mysqld_safe Assigning 00000000-0000-0000-0000-000000000000:-1 to wsrep_start_position

Galera Cluster

When etcd is available the container will check to see if there's an existing cluster, if so it will join it. If not it will perform an election that will last for 5 minutes. During that time the first server that can grab a lock becomes the leader and any other nodes will wait until that server is ready before starting. If the leader fails to start the election is busted and all nodes will need to be destroyed until the 5 minutes passes.

An example Vagrantfile is provided which will start a 3 node CoreOS cluster each node running a database with replication automatically set up.

$ vagrant up
$ ssh coreos-01
$ watch docker ps

At this point the coreos user-data is starting the database. It has to be downloaded from the docker hub first, and this can take some time. Eventually the container will start and you'll see this in the console:

CONTAINER ID        IMAGE                            COMMAND             CREATED              STATUS              PORTS                                                                                            NAMES
912ad42a4d1a        paulczar/percona-galera:latest   "/app/bin/boot"     About a minute ago   Up About a minute   0.0.0.0:3306->3306/tcp, 0.0.0.0:4444->4444/tcp, 0.0.0.0:4567->4567/tcp, 0.0.0.0:4568->4568/tcp   database

Next we can watch mysql starting by utilizing journalctl

$ journalctl -f -u database
Sep 20 18:54:36 core-01 sh[1489]: Starting MySQL for reals
Sep 20 18:54:36 core-01 sh[1489]: ==> Performing Election...
Sep 20 18:54:36 core-01 sh[1489]: -----> Hurruh I win!
Sep 20 18:54:36 core-01 sh[1489]: ==> sleeping for 20 seconds, then testing if DB is up.
Sep 20 18:54:36 core-01 sh[1489]: *** 18:54:36 mysqld_safe Logging to '/var/lib/mysql/912ad42a4d1a.err'.
Sep 20 18:54:36 core-01 sh[1489]: *** 18:54:36 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 20 18:54:36 core-01 sh[1489]: *** 18:54:36 mysqld_safe Skipping wsrep-recover for 82f9ad85-40f7-11e4-9f0d-1eed76224be8:0 pair
Sep 20 18:54:36 core-01 sh[1489]: *** 18:54:36 mysqld_safe Assigning 82f9ad85-40f7-11e4-9f0d-1eed76224be8:0 to wsrep_start_position
Sep 20 18:54:56 core-01 sh[1489]: ==> database running...

At this point we can actually console into the container by running database which is a function we inject in the user-data to use nsenter to get a shell inside the database container...

$ database
root@e9682b05cf5e:/# mysql -e "show status like 'wsrep_cluster%'"
+--------------------------+--------------------------------------+
| Variable_name            | Value                                |
+--------------------------+--------------------------------------+
| wsrep_cluster_conf_id    | 3                                    |
| wsrep_cluster_size       | 3                                    |
| wsrep_cluster_state_uuid | 1b92a583-40f6-11e4-ad62-46aacd6cd67e |
| wsrep_cluster_status     | Primary                              |
+--------------------------+--------------------------------------+

There are some hints that you need to pass via environment variables to make this magic happen. These are provided in the database unit in user-data.erb. Explore user-data.erb, bin/boot, and bin/functions to see how the sausage is made.

cluster hints

These are the only madatory ones. the rest default to sensible values.

  • HOST - set this to the Host IP that you want to publish as your endpoint.
  • ETCD_HOST - set if the etcd endpoint is different to the Host IP above.

GarbD

If you want to stick to a two node cluster you can start garbd to act as the arbiter.

$ eval `cat /etc/environment`
$ /usr/bin/docker run --name database-garbd --rm -p 3306:3306 -p 4444:4444 -p 4567:4567 -p 4568:4568 -e PUBLISH=4567 -e HOST=$COREOS_PRIVATE_IPV4 -e CLUSTER=openstack paulczar/percona-galera:latest /app/bin/garbd

Load ***

You can use an external load *** if you have one DB per host. If you're getting fancy you can also run a local haproxy load *** ( or multiples ) which will load balance ( round robin, nothing fancy ) database connections between your nodes

$ eval `cat /etc/environment`
$ /usr/bin/docker run --name database-load*** --rm -p 3307:3307 -p 8888:8080 -e PUBLISH=3307 -e HOST=$COREOS_PRIVATE_IPV4 paulczar/percona-galera:latest /app/bin/load***

Development

You can use vagrant in developer mode which will install the service but not run it. it will also enable debug mode on the start script, share the local path into /home/coreos/share via nfs and build the image locally. This takes quite a while as it builds the image on each VM, but once its up further rebuilds should be quick thanks to the caches.

$ dev=1 vagrant up
$ vagrant ssh core-01

Author(s)

Paul Czarkowski (***)

License

Copyright 2014 Paul Czarkowski

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

[***]

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

查看更多 mariadb-galera 相关镜像 →
bitnami/mariadb-galera logo
bitnami/mariadb-galera
bitnami
Bitnami安全镜像,用于部署高可用MariaDB Galera集群,具备安全加固特性。
25 次收藏1000万+ 次下载
6 个月前更新
bitnamicharts/mariadb-galera logo
bitnamicharts/mariadb-galera
bitnamicharts
Bitnami提供的Helm chart,用于在Kubernetes环境中部署高可用MariaDB Galera集群,支持同步多主复制,保障数据一致性与服务可靠性。
1 次收藏100万+ 次下载
6 个月前更新
kitpages/mariadb-galera logo
kitpages/mariadb-galera
kitpages
MariaDB with Galera
2 次收藏1000万+ 次下载
9 年前更新
valentinnc/mariadb-galera logo
valentinnc/mariadb-galera
valentinnc
用于部署高可用MariaDB Galera集群的Docker镜像,支持通过环境变量配置数据库参数,可实现数据持久化存储,适用于构建可靠的数据库服务。
1 次收藏10万+ 次下载
9 年前更新
qindel/mariadb-galera logo
qindel/mariadb-galera
qindel
暂无描述
1 次收藏5万+ 次下载
11 个月前更新
bitnamilegacy/mariadb-galera logo
bitnamilegacy/mariadb-galera
bitnamilegacy
遗留的Bitnami镜像,不再提供更新支持
2 次收藏5万+ 次下载
6 个月前更新

轩辕镜像配置手册

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式

Docker 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

使用与功能问题

docker search 报错:专属域名下仅支持 Docker Hub 查询

docker search 报错问题

网页搜不到镜像:Docker Hub 有但轩辕镜像搜索无结果

镜像搜索不到

离线传输镜像:无法直连时用 docker save/load 迁移

离线传输镜像

Docker 插件安装错误:application/vnd.docker.plugin.v1+json

Docker 插件安装错误

WSL 下 Docker 拉取慢:网络与挂载目录影响及优化

WSL 拉取镜像慢

轩辕镜像是否安全?镜像完整性校验(digest)说明

镜像安全性

如何用轩辕镜像拉取镜像?登录方式与专属域名配置

如何拉取镜像

错误码与失败问题

manifest unknown 错误:镜像不存在或标签错误

manifest unknown 错误

TLS/SSL 证书验证失败:Docker pull 时 HTTPS 证书错误

TLS 证书验证失败

DNS 解析超时:无法解析镜像仓库地址或连接超时

DNS 解析超时

410 Gone 错误:Docker 版本过低导致协议不兼容

410 错误:版本过低

402 Payment Required 错误:流量耗尽错误提示

402 错误:流量耗尽

401 UNAUTHORIZED 错误:身份认证失败或登录信息错误

身份认证失败错误

429 Too Many Requests 错误:请求频率超出专业版限制

429 限流错误

Docker login 凭证保存错误:Cannot autolaunch D-Bus(不影响登录)

凭证保存错误

账号 / 计费 / 权限

免费版与专业版区别:功能、限额与使用场景对比

免费版与专业版区别

支持的镜像仓库:Docker Hub、GCR、GHCR、K8s 等列表

轩辕镜像支持的镜像仓库

拉取失败是否扣流量?计费规则说明

拉取失败流量计费

KYSEC 权限不够:麒麟 V10/统信 UOS 下脚本执行被拦截

KYSEC 权限错误

如何申请开具发票?(增值税普票/专票)

开具发票

如何修改网站与仓库登录密码?

修改网站和仓库密码

配置与原理类

registry-mirrors 未生效:仍访问官方仓库或报错的原因

registry-mirrors 未生效

如何去掉镜像名称中的轩辕域名前缀?(docker tag)

去掉域名前缀

如何拉取指定架构镜像?(ARM64/AMD64 等多架构)

拉取指定架构镜像

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
inspectormeow/mariadb-galera
博客公告Docker 镜像公告与技术博客
热门镜像查看热门 Docker 镜像推荐
一键安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单,官方技术交流群:1072982923。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单,官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.