如何更改memsql节点的IP地址 [英] How to change IP addresses of memsql nodes

查看:197
本文介绍了如何更改memsql节点的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过以最简单的配置在笔记本电脑上运行memsql来测试项目. IP地址为192.168.0.22,在家里工作正常.当我带上笔记本电脑工作时,它会获得一个不同的IP地址(10.0.1.35),而当我启动服务器时,它无法使节点联机.我在ops应用中收到此消息:

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.

有什么方法可以更改节点的IP地址,以便我可以在任一位置运行memsql吗?

Is there any way to change the IP addresses of the nodes so I can run memsql in either location?

推荐答案

要更改IP,您可能需要在两个位置进行更新:

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:连接到MemSQL并运行

MemSQL: Connect to MemSQL and run

REMOVE LEAF ‘old ip':port FORCE;
ADD LEAF root@‘<new ip>’:port;

听起来好像您在同一台计算机上同时运行两个节点,在这种情况下,您可能希望使用127.0.0.1作为IP,以避免计算机IP更改出现问题.

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.

这篇关于如何更改memsql节点的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆