Set up aliases for primary/replica

This commit is contained in:
Andrew Mason 2020-07-06 18:56:58 -04:00
parent 322a477771
commit 5b177e7dce

View File

@ -46,17 +46,17 @@ dbdeployer deploy replication $MYSQL_VERSION \
--my-cnf-options binlog_format=ROW \
--sandbox-directory gh-ost-test
echo '#!/bin/bash' > /usr/local/bin/gh-ost-test-mysql-master
echo '/root/sandboxes/gh-ost-test/m "$@"' >> /usr/local/bin/gh-ost-test-mysql-master
chmod +x /usr/local/bin/gh-ost-test-mysql-master
echo '#!/bin/bash' > /usr/local/bin/gh-ost-test-mysql-primary
echo '/root/sandboxes/gh-ost-test/m "$@"' >> /usr/local/bin/gh-ost-test-mysql-primary
chmod +x /usr/local/bin/gh-ost-test-mysql-primary
echo '#!/bin/bash' > /usr/local/bin/gh-ost-test-mysql-replica
echo '/root/sandboxes/gh-ost-test/s1 "$@"' > /usr/local/bin/gh-ost-test-mysql-replica
chmod +x /usr/local/bin/gh-ost-test-mysql-replica
echo "Creating gh-ost user"
gh-ost-test-mysql-master -uroot -e"CREATE USER IF NOT EXISTS 'gh-ost'@'%' IDENTIFIED BY 'gh-ost'"
gh-ost-test-mysql-master -uroot -e"GRANT ALL PRIVILEGES ON *.* TO 'gh-ost'@'%'"
gh-ost-test-mysql-primary -uroot -e"CREATE USER IF NOT EXISTS 'gh-ost'@'%' IDENTIFIED BY 'gh-ost'"
gh-ost-test-mysql-primary -uroot -e"GRANT ALL PRIVILEGES ON *.* TO 'gh-ost'@'%'"
echo "Reading database topology"
master_host="127.0.0.1"