Skip to content

nisang/mysql-pxc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

mysql-pxc

Percona XtraDB Cluster Docker 集群方案

构建 build

  构建master
        docker build -t xtradb:master .
  构建slave
        docker build -t xtradb:slave .

运行 run

  docker run -d --name xtradbnode1 -p 3306:3306 daocloud.io/onatkh/xtradb-master:master-init /usr/bin/mysqld_safe
  docker run -d --name xtradbnode2 -p 13306:3306 --link xtradbnode1:node1 daocloud.io/onatkh/xtradb-slave:master-init /usr/bin/mysqld_safe

测试 test

  通过mysql命定行查看是否成功
  
  mysql$:show global status like 'wsrep_cluster_size';

镜像 images

  master镜像:daocloud.io/onatkh/xtradb-master:master-init
        pull:docker pull daocloud.io/onatkh/xtradb-master:master-init
  镜像:daocloud.io/onatkh/xtradb-slave:master-init
        pull:docker pull daocloud.io/onatkh/xtradb-slave:master-init

方案来自:

  http://www.oschina.net/translate/percona-xtradb-cluster-how-to-run-a-2-node-cluster-on-a-single-server

About

Percona XtraDB Cluster Docker 集群方案

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published