How to change IP addresses of memsql nodes

半世苍凉 提交于 2020-01-03 02:19:56

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!