Last active
June 11, 2018 12:29
-
-
Save wwwted/f11062e47d5265ea386d6c0976cd7a06 to your computer and use it in GitHub Desktop.
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
4 Screens : watch "pgrep -fla mysql | grep -v pgrep" | |
watch ./count.sh | |
. ./setenv | |
(to get correct path to binaries) | |
Create InnoDB cluster | |
====================== | |
./shell/bin/mysqlsh < scripts/deploy.js | |
./shell/bin/mysqlsh -uroot -proot -h127.0.0.1 -P3310 < scripts/persist-config.js | |
./shell/bin/mysqlsh -uroot -proot -h127.0.0.1 -P3310 < scripts/create.js | |
Start Router | |
============= | |
./router/bin/mysqlrouter --bootstrap localhost:3310 -d myrouter | |
./myrouter/start.sh | |
Test with HA app | |
================= | |
Create test database: | |
mysql -uroot -proot -P6446 -h127.0.0.1 | |
create database test; | |
Start app: python ./scripts/failover-demo.py 6446 | |
(if you have problems, look below) | |
For python program to work with MySQL 8 you need to: | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
(Step 2 should be enough but there is something in native Python connector detecting | |
that new authentication plugin in active and aborts at connect with error: | |
"Authentication plugin 'caching_sha2_password' is not supported") | |
Only running Step-2 "ALTER" I can connect with old MySQL Clients but not with Python connector ( | |
1) update configutaion on all 3 MySQL nodes with: default_authentication_plugin=mysql_native_password | |
restart the 3 nodes: | |
- dba.stopSandboxInstance(3310); | |
- dba.startSandboxInstance(3310); | |
...... | |
2) Update root account to use old authentication: | |
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root'; | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root'; | |
Other | |
====== | |
./shell/bin/mysqlsh -uroot -proot -h127.0.0.1 -P3310 | |
cluster = dba.getCluster(); | |
cluster.status(); | |
Remove all: | |
./shell/bin/mysqlsh -uroot -proot -h127.0.0.1 -P3330 < scripts/remove.js | |
./myrouter/stop.sh | |
rm -fr myrouter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment