register-node

Register an existing MemSQL node on the local machine.

Usage

Usage:
  memsqlctl register-node [flags]

Flags:
      --auditlogsdir DIRECTORY_PATH   Path to the auditlogs directory
      --datadir DIRECTORY_PATH        Path to the data directory
      --force                         Skip safety checks that require the node be online (e.g., password is correct). Use this flag to register an offline node.
  -h, --help                          help for register-node
      --memsql-config FILE_PATH       Path to the MemSQL config file
      --password REQUIRED_STRING      The current MemSQL root password
      --pid-file FILE_PATH            Path to the current pid file
      --plancachedir DIRECTORY_PATH   Path to the plancache directory
  -P, --port PORT                     The current port
      --tracelogsdir DIRECTORY_PATH   Path to the the tracelogs directory

Global Flags:
  -c, --config FILE_PATH                     Path to the memsqctl config file
      --default-install-dir DIRECTORY_PATH   Path to the default install directory
  -j, --json                                 Print output in JSON format
      --node-metadata-file FILE_PATH         Path to the node metadata file
      --parallelism int                      Maximum amount of operations to be run in parallel
      --ssl-ca FILE_PATH                     Path to the CA certificate file in PEM format to authenticate the MemSQL server certificate
      --timeout duration                     Maximum time for operation to complete (e.g., 30s, 10m, 1.5h)
  -v, --verbosity count                      Increase logging verbosity
  -y, --yes                                  Enable non-interactive mode and assume the user would like to move forward with the proposed actions by default

Remarks

The path to the node’s memsql.cnf file must be passed into the --memsql-config flag. The default location for this file is at /var/lib/memsql/<UUID>/memsql.cnf on the host machine. Also, the auditlogs, data, tracelogs, and plancache directories specified in memsql.cnf must be owned by the MemSQL user for that node. The default owner:group for each node is memsql:memsql.

The register-node command also assumes the node is online. If you are trying to register a node that is offline, you must specify --force when running this command. Note: This will cause memsqlctl to skip safety checks that require the node to be online (e.g., password is correct).

This command is interactive unless you use either the --yes or --json flags to override interactive behavior.

Output

The following example shows how to register an existing node with a different memsql.cnf file.

$ sudo memsqlctl register-node --memsql-config /tmp/memsql.cnf
memsqlctl will perform the following actions:
  · Register node on port 3308
    - Config file = /tmp/memsql.cnf
      + datadir = /tmp/data
      + plancachedir = /tmp/plancache
      + tracelogsdir = /tmp/tracelogs
      + auditlogsdir = /tmp/auditlogs

Would you like to continue? [y/N]: y
Was this article useful?