- ENV OL7 MySQL Server, Shell and Router - 8.0.15 - binary tarball pulled from internal repository export PATH=$PATH:/export/umesh/server/binaries/GABuilds/mysql-8.0.15-linux-glibc2.12-x86_64/bin:/export/umesh/server/binaries/GABuilds/mysql-shell-8.0.15/bin bin/mysqlsh --log-level=debug3 [umshastr@hod03]/export/umesh/server/binaries/GABuilds: [umshastr@hod03]/export/umesh/server/binaries/GABuilds: cd mysql-shell-8.0.15/ [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-shell-8.0.15: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-shell-8.0.15: export PATH=$PATH:/export/umesh/server/binaries/GABuilds/mysql-8.0.15-linux-glibc2.12-x86_64/bin:/export/umesh/server/binaries/GABuilds/mysql-shell-8.0.15/bin [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-shell-8.0.15: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-shell-8.0.15: bin/mysqlsh --log-level=debug3 MySQL Shell 8.0.15 Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type '\help' or '\?' for help; '\quit' to exit. MySQL JS > dba.deploySandboxInstance(3310) A new MySQL sandbox instance will be created on this host in /home/umshastr/mysql-sandboxes/3310 Warning: Sandbox instances are only suitable for deploying and running on your local machine for testing purposes and are not accessible from external networks. Please enter a MySQL root password for the new instance: Deploying new MySQL instance... Instance localhost:3310 successfully deployed and started. Use shell.connect('root@localhost:3310'); to connect to the instance. MySQL JS > dba.deploySandboxInstance(3320) A new MySQL sandbox instance will be created on this host in /home/umshastr/mysql-sandboxes/3320 Warning: Sandbox instances are only suitable for deploying and running on your local machine for testing purposes and are not accessible from external networks. Please enter a MySQL root password for the new instance: Deploying new MySQL instance... Instance localhost:3320 successfully deployed and started. Use shell.connect('root@localhost:3320'); to connect to the instance. MySQL JS > dba.deploySandboxInstance(3330) A new MySQL sandbox instance will be created on this host in /home/umshastr/mysql-sandboxes/3330 Warning: Sandbox instances are only suitable for deploying and running on your local machine for testing purposes and are not accessible from external networks. Please enter a MySQL root password for the new instance: Deploying new MySQL instance... Instance localhost:3330 successfully deployed and started. Use shell.connect('root@localhost:3330'); to connect to the instance. MySQL JS > \connect root@localhost:3310 Creating a session to 'root@localhost:3310' Please provide the password for 'root@localhost:3310': Save password for 'root@localhost:3310'? [Y]es/[N]o/Ne[v]er (default No): Fetching schema names for autocompletion... Press ^C to stop. Your MySQL connection id is 11 Server version: 8.0.15 MySQL Community Server - GPL No default schema selected; type \use to set one. MySQL localhost:3310 ssl JS > cluster = dba.createCluster("myCluster") A new InnoDB cluster will be created on instance 'root@localhost:3310'. Validating instance at localhost:3310... Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as hod03 Instance configuration is suitable. Creating InnoDB cluster 'myCluster' on 'root@localhost:3310'... Adding Seed Instance... Cluster successfully created. Use Cluster.addInstance() to add MySQL instances. At least 3 instances are needed for the cluster to be able to withstand up to one server failure. MySQL localhost:3310 ssl JS > cluster.addInstance("root@localhost:3320") A new instance will be added to the InnoDB cluster. Depending on the amount of data on the cluster this might take from a few seconds to several hours. Adding instance to the cluster ... Please provide the password for 'root@localhost:3320': Save password for 'root@localhost:3320'? [Y]es/[N]o/Ne[v]er (default No): Validating instance at localhost:3320... Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as hod03 Instance configuration is suitable. The instance 'root@localhost:3320' was successfully added to the cluster. MySQL localhost:3310 ssl JS > cluster.addInstance("root@localhost:3330") A new instance will be added to the InnoDB cluster. Depending on the amount of data on the cluster this might take from a few seconds to several hours. Adding instance to the cluster ... Please provide the password for 'root@localhost:3330': Save password for 'root@localhost:3330'? [Y]es/[N]o/Ne[v]er (default No): Validating instance at localhost:3330... Instance detected as a sandbox. Please note that sandbox instances are only suitable for deploying test clusters for use within the same host. This instance reports its own address as hod03 Instance configuration is suitable. The instance 'root@localhost:3330' was successfully added to the cluster. MySQL localhost:3310 ssl JS > cluster.status() { "clusterName": "myCluster", "defaultReplicaSet": { "name": "default", "primary": "localhost:3310", "ssl": "REQUIRED", "status": "OK", "statusText": "Cluster is ONLINE and can tolerate up to ONE failure.", "topology": { "localhost:3310": { "address": "localhost:3310", "mode": "R/W", "readReplicas": {}, "role": "HA", "status": "ONLINE" }, "localhost:3320": { "address": "localhost:3320", "mode": "R/O", "readReplicas": {}, "role": "HA", "status": "ONLINE" }, "localhost:3330": { "address": "localhost:3330", "mode": "R/O", "readReplicas": {}, "role": "HA", "status": "ONLINE" } }, "topologyMode": "Single-Primary" }, "groupInformationSourceMember": "hod03:3310" } MySQL localhost:3310 ssl JS > -- bin/mysqlrouter --bootstrap root@localhost:3310 --directory /export/umesh/server/binaries/GABuilds/Bug95080 [umshastr@hod03]/export/umesh/server/binaries/GABuilds: cd mysql-router-8.0.15-linux-glibc2.12-x86_64/ [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64: bin/mysqlrouter --bootstrap root@localhost:3310 --directory /export/umesh/server/binaries/GABuilds/Bug95080 Please enter MySQL password for root: Bootstrapping MySQL Router instance at '/export/umesh/server/binaries/GABuilds/Bug95080'... Checking for old Router accounts Creating account mysql_router1_5i90ja0gpugy@'%' MySQL Router has now been configured for the InnoDB cluster 'myCluster'. The following connection information can be used to connect to the cluster after MySQL Router has been started with generated configuration.. Classic MySQL protocol connections to cluster 'myCluster': - Read/Write Connections: localhost:6446 - Read/Only Connections: localhost:6447 X protocol connections to cluster 'myCluster': - Read/Write Connections: localhost:64460 - Read/Only Connections: localhost:64470 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64: [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64: cd /export/umesh/server/binaries/GABuilds/Bug95080 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: ls -l total 16 drwx------ 2 umshastr common 49 Apr 24 13:59 data drwx------ 2 umshastr common 36 Apr 24 13:59 log -rw------- 1 umshastr common 1366 Apr 24 13:59 mysqlrouter.conf -rw------- 1 umshastr common 118 Apr 24 13:59 mysqlrouter.key drwx------ 2 umshastr common 10 Apr 24 13:59 run -rwx------ 1 umshastr common 243 Apr 24 13:59 start.sh -rwx------ 1 umshastr common 251 Apr 24 13:59 stop.sh [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: ./start.sh [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: ps aux|grep mysqlrouter umshastr 4313 2.2 0.0 501528 5904 pts/15 Sl 13:59 0:00 /export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64/bin/mysqlrouter -c /export/umesh/server/binaries/GABuilds/Bug95080/mysqlrouter.conf umshastr 4330 0.0 0.0 112632 972 pts/15 S+ 14:00 0:00 grep --color=auto mysqlrouter - connected to 6446 [umshastr@hod03]/export/umesh/server/binaries/GABuilds/mysql-8.0.15-linux-glibc2.12-x86_64: bin/mysql -uroot -hlocalhost -P 6446 --protocol=tcp Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 503 Server version: 8.0.15 MySQL Community Server - GPL Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SELECT @@port; +--------+ | @@port | +--------+ | 3310 | +--------+ 1 row in set (0.00 sec) mysql> [umshastr@hod03]~: ps aux|grep -i mysqlrouter umshastr 4313 2.1 0.0 568092 5948 pts/15 Sl 13:59 0:10 /export/umesh/server/binaries/GABuilds/mysql-router-8.0.15-linux-glibc2.12-x86_64/bin/mysqlrouter -c /export/umesh/server/binaries/GABuilds/Bug95080/mysqlrouter.conf umshastr 4820 0.0 0.0 112632 988 pts/16 S+ 14:07 0:00 grep --color=auto -i mysqlrouter [umshastr@hod03]~: [umshastr@hod03]~: top -p 4313 - no activity on sandbox 21 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0H 22 root rt 0 0 0 0 S 0.0 0.0 2:15.70 watchdog/3 23 root 20 0 0 0 0 S 0.0 0.0 10:43.12 ksoftirqd/3 24 root rt 0 0 0 0 S 0.0 0.0 0:08.99 migration/3 26 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/3:0H 27 root rt 0 0 0 0 S 0.0 0.0 2:12.63 watchdog/4 [umshastr@hod03]~: top -p 4313 [umshastr@hod03]~: top -p 4313 top - 14:32:58 up 472 days, 18:33, 4 users, load average: 0.33, 0.26, 0.22 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.8 us, 0.2 sy, 0.0 ni, 98.8 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30563.29+free, 18216.43+used, 209129.2+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224413.2+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4313 umshastr 20 0 568092 5948 4808 S 6.7 0.0 0:43.24 main top - 14:33:28 up 472 days, 18:34, 4 users, load average: 0.37, 0.28, 0.23 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.3 us, 0.2 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30569.72+free, 18211.93+used, 209127.3+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224419.6+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4313 umshastr 20 0 568092 5948 4808 S 2.7 0.0 0:43.89 main top - 14:33:34 up 472 days, 18:34, 4 users, load average: 0.34, 0.28, 0.23 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30570.32+free, 18211.34+used, 209127.3+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224420.2+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4313 umshastr 20 0 568092 5948 4808 S 2.0 0.0 0:44.01 main top - 14:34:01 up 472 days, 18:34, 4 users, load average: 0.56, 0.33, 0.25 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.4 us, 0.3 sy, 0.0 ni, 99.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30569.92+free, 18211.77+used, 209127.3+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224419.8+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4313 umshastr 20 0 568092 5948 4808 S 2.3 0.0 0:44.60 main 1 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/2:0H 22 root rt 0 0 0 0 S 0.0 0.0 2:15.71 watchdog/3 23 root 20 0 0 0 0 S 0.0 0.0 10:43.14 ksoftirqd/3 24 root rt 0 0 0 0 S 0.0 0.0 0:08.99 migration/3 [umshastr@hod03]~: top -p 4313 top - 15:10:33 up 472 days, 19:11, 4 users, load average: 0.16, 0.18, 0.22 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.8 us, 0.2 sy, 0.0 ni, 98.8 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30475.66+free, 18228.12+used, 209205.2+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224403.5+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 4313 umshastr 20 0 568092 6004 4824 S 6.7 0.0 1:31.60 main - mysqlrouter log [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: cat log/mysqlrouter.log 2019-04-24 13:59:38 main INFO [7f4e8cd67780] PID 4313 written to '/export/umesh/server/binaries/GABuilds/Bug95080/mysqlrouter.pid' 2019-04-24 13:59:38 main INFO [7f4e8cd67780] Loading all plugins. 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'metadata_cache:myCluster' loading 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'routing:myCluster_default_ro' loading 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'routing:myCluster_default_rw' loading 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'routing:myCluster_default_x_ro' loading 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'routing:myCluster_default_x_rw' loading 2019-04-24 13:59:38 main INFO [7f4e8cd67780] Initializing all plugins. 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'metadata_cache' initializing 2019-04-24 13:59:38 main INFO [7f4e8cd67780] plugin 'routing' initializing 2019-04-24 13:59:38 main INFO [7f4e8cd67780] Starting all plugins. 2019-04-24 13:59:38 main INFO [7f4e89f4d700] plugin 'metadata_cache:myCluster' starting 2019-04-24 13:59:38 main INFO [7f4e8954c700] plugin 'routing:myCluster_default_ro' starting 2019-04-24 13:59:38 main INFO [7f4e88b4b700] plugin 'routing:myCluster_default_rw' starting 2019-04-24 13:59:38 main INFO [7f4e7bfff700] plugin 'routing:myCluster_default_x_ro' starting 2019-04-24 13:59:38 routing INFO [7f4e8954c700] [routing:myCluster_default_ro] started: listening on 0.0.0.0:6447 2019-04-24 13:59:38 main INFO [7f4e7b5fe700] plugin 'routing:myCluster_default_x_rw' starting 2019-04-24 13:59:38 routing INFO [7f4e88b4b700] [routing:myCluster_default_rw] started: listening on 0.0.0.0:6446 2019-04-24 13:59:38 main INFO [7f4e8cd67780] Running. 2019-04-24 13:59:38 routing INFO [7f4e7bfff700] [routing:myCluster_default_x_ro] started: listening on 0.0.0.0:64470 2019-04-24 13:59:38 routing INFO [7f4e7b5fe700] [routing:myCluster_default_x_rw] started: listening on 0.0.0.0:64460 2019-04-24 13:59:38 metadata_cache INFO [7f4e89f4d700] Starting Metadata Cache 2019-04-24 13:59:38 metadata_cache INFO [7f4e89f4d700] Connections using ssl_mode 'PREFERRED' 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] Starting metadata cache refresh thread 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] Potential changes detected in cluster 'myCluster' after metadata refresh 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] Metadata for cluster 'myCluster' has 1 replicasets: 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] 'default' (3 members, single-master) 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] localhost:3310 / 33100 - role=HA mode=RW 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] localhost:3320 / 33200 - role=HA mode=RO 2019-04-24 13:59:38 metadata_cache INFO [7f4e8cd63700] localhost:3330 / 33300 - role=HA mode=RO [umshastr@hod03]~: strace -p 4313 Process 4313 attached futex(0x7f4e8bf6f784, FUTEX_WAIT_PRIVATE, 1, NULL^CProcess 4313 detached ^^ First time it shown 6.7, otherwise mostly switching from 2.0,2.3 to 2.7 - cluster is unused and no activity - stopped mysqlrouter, restarted [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: ./stop.sh [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: ./start.sh [umshastr@hod03]/export/umesh/server/binaries/GABuilds/Bug95080: top - 15:13:20 up 472 days, 19:14, 4 users, load average: 0.02, 0.12, 0.19 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.8 us, 0.2 sy, 0.0 ni, 98.8 id, 0.2 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30473.98+free, 18229.27+used, 209205.7+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224401.9+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 10155 umshastr 20 0 501528 5916 4804 S 6.7 0.0 0:00.48 main top - 15:14:29 up 472 days, 19:15, 4 users, load average: 0.12, 0.13, 0.19 Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.4 us, 0.2 sy, 0.0 ni, 99.4 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st MiB Mem : 257909.0+total, 30474.10+free, 18229.44+used, 209205.4+buff/cache MiB Swap: 7999.996 total, 777.727 free, 7222.270 used. 224402.0+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 10155 umshastr 20 0 501528 5916 4804 S 2.7 0.0 0:01.97 main .