forked from go-mysql-org/go-mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor, unify some MySQL and MariaDB interface
MySQL GTID failover use position check like MHA
- Loading branch information
1 parent
03e1e4e
commit 75746a7
Showing
15 changed files
with
652 additions
and
685 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
IMAGE=siddontang/mysql:latest | ||
MYSQL_IMAGE=siddontang/mysql:latest | ||
MARIADB_IMAGE=siddontang/mariadb:latest | ||
|
||
all: build | ||
|
||
build: | ||
@docker run -d -p 3306:3306 --name=mysql1 -e "GTID_MODE=on" -e "SERVER_ID=1" ${IMAGE} | ||
@docker run -d -p 3307:3306 --name=mysql2 -e "GTID_MODE=on" -e "SERVER_ID=2" ${IMAGE} | ||
@docker run -d -p 3308:3306 --name=mysql3 -e "GTID_MODE=on" -e "SERVER_ID=3" ${IMAGE} | ||
@docker run -d -p 3306:3306 --name=mysql1 -e "GTID_MODE=on" -e "SERVER_ID=1" ${MYSQL_IMAGE} | ||
@docker run -d -p 3307:3306 --name=mysql2 -e "GTID_MODE=on" -e "SERVER_ID=2" ${MYSQL_IMAGE} | ||
@docker run -d -p 3308:3306 --name=mysql3 -e "GTID_MODE=on" -e "SERVER_ID=3" ${MYSQL_IMAGE} | ||
@docker run -d -p 3316:3306 --name=mariadb1 -e "SERVER_ID=4" ${MARIADB_IMAGE} | ||
@docker run -d -p 3317:3306 --name=mariadb2 -e "SERVER_ID=5" ${MARIADB_IMAGE} | ||
@docker run -d -p 3318:3306 --name=mariadb3 -e "SERVER_ID=6" ${MARIADB_IMAGE} | ||
|
||
image: | ||
@docker pull ${IMAGE} | ||
@docker pull ${MYSQL_IMAGE} | ||
@docker pull ${MARIADB_IMAGE} | ||
|
||
stop: | ||
@docker stop mysql1 mysql2 mysql3 | ||
@docker stop mysql1 mysql2 mysql3 mariadb4 mariadb5 mariadb6 | ||
|
||
clean: | ||
@docker rm -f mysql1 mysql2 mysql3 | ||
@docker rm -f mysql1 mysql2 mysql3 mariadb4 mariadb5 mariadb6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.