问题
I'm testing out memsql for a project by running it on a laptop in its simplest configuration. It was working fine at home with an IP address of 192.168.0.22. When I take the laptop in to work, it gets a different IP address (10.0.1.35), and when I start up the server, it's unable to bring the nodes online. I get this message in the ops app:
192.168.0.22:3306: This MemSQL node is offline, but MemSQL Ops expects it to be online.
192.168.0.22:3307: This MemSQL node is offline, but MemSQL Ops expects it to be online.
Is there any way to change the IP addresses of the nodes so I can run memsql in either location?
回答1:
To change the IP you probably need to update it in two places:
Ops: On the command line run:
memsql-ops memsql-unmonitor <old memsql id>
memsql-ops memql-monitor [-h <HOST>] [-P <PORT>]
MemSQL: Connect to MemSQL and run
REMOVE LEAF ‘old ip':port FORCE;
ADD LEAF root@‘<new ip>’:port;
It sounds like you are running both nodes on the same machine, in which case you may want to use 127.0.0.1 as the IP to avoid issues with your machine's IP changing.
来源:https://stackoverflow.com/questions/36722282/how-to-change-ip-addresses-of-memsql-nodes