ALTER NODE
On this page
While each node in a cluster resides on a specific host, the host itself can be part of multiple networks, both internal and external, and thus can be addressed by multiple hostnames and/or IP addresses.
The ALTER NODE command can be used to set:
-
An external hostname or IP address with which to address a node.
-
An external port with which to connect to a node.
-
The internal host or port metadata of the leaf node in the cluster.
Syntax
ALTER NODE <host>:<port>{ SET EXTERNAL_HOST=<external_host>, EXTERNAL_PORT=<external_port> |SET [HOST=<internal_host>,] PORT=<internal_port>}
Arguments
-
<host>: The node’s host (hostname or IP address). -
<port>: The node’s port on the host. -
<external_: The external host (hostname or IP address) with which to address the node.host> -
<external_: The external port with which to connect to the node.port> -
<internal_: New internal hostname or IP address for the node.host> -
<internal_: New internal port on which the node listens for cluster traffic.port>
Remarks
-
If only updating the host,
<port>and<external_can be the same value.port> -
If only updating the port,
<host>and<external_can be the same value.host> -
The
ALTER NODEcommand is used when the secondary cluster connects to the primary cluster during disaster recovery (DR) replication.-
DR connections are made from nodes on the secondary cluster to nodes on the primary cluster.
-
The nodes on the secondary cluster use the external host and external port to make these connections.
-
If the host and/or port are not specified, the host and/or port are used that were initially defined when the leaf node was added to the cluster.
-
-
The SingleStore database user must have the
CLUSTERprivilege to run theALTER NODEcommand. -
The
ALTER NODEcommand returns an error if the external host (hostname or IP address) and/or port are already in use.
Update Internal Host or Port
SET HOST, PORT operates on the cluster metadata and updates the internal host and port metadata that the cluster uses to reach an existing leaf node.
To update the internal host and/or port of a node, follow the instructions for the relevant process.
Example
To change the external hostname and port of a node:
ALTER NODE '127.0.0.1':3306 SET EXTERNAL_HOST='127.0.0.1', EXTERNAL_PORT=3316;
Query OK, 0 rows affected (7 ms)To change the internal host and/or port of a node, follow the instructions in Update Internal Host or Port.
Related Topic
Last modified: