# cat /tmp/setup/router.ini
[fabric_cache:dummy]
address = 172.17.0.9
user = dummy
[routing:master]
bind_address= 0.0.0.0:13306
mode = read-write
destinations= fabric+cache://dummy/group/myfabric
[routing:slave]
bind_address= 0.0.0.0:23306
mode = read-only
destinations= fabric+cache://dummy/group/myfabric
- 13306と23306をLISTENしておるじゃろ?
# ss -ltpn
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 0 *:23306 *:* users:(("mysqlrouter",1,6))
LISTEN 0 0 *:13306 *:* users:(("mysqlrouter",1,5))
# cat /tmp/setup/router.ini
[fabric_cache:dummy]
address = 172.17.0.9
user = dummy
[routing:master]
bind_address= 0.0.0.0:33306
mode = read-write
destinations= fabric+cache://dummy/group/myfabric
[routing:slave]
bind_address= 0.0.0.0:23306
mode = read-only
destinations= fabric+cache://dummy/group/myfabric
# ps auxww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.1 0.2 435440 3052 ? Ssl 18:11 0:00 /usr/sbin/mysqlrouter --extra-config=/tmp/setup/router.ini
root 30 0.0 0.2 13292 2052 ? S 18:11 0:00 bash
root 44 0.0 0.1 21312 1380 ? R+ 18:11 0:00 ps auxww
# kill -HUP 1
# ss -ltpn
State Recv-Q Send-Q Local Address:Port Peer Address:Port
LISTEN 0 0 *:23306 *:* users:(("mysqlrouter",1,6))
LISTEN 0 0 *:13306 *:* users:(("mysqlrouter",1,5))