memsqlctl
On this page
Overview
-
Memsqlctl Config File (memsqlctl.
hcl): Overrides the default settings for the entire system. -
Memsqlctl State File (nodes.
hcl): Contains information about SingleStoreDB nodes that exist on that host.
memsqlctl Config File (memsqlctl. hcl)
The memsqlctl config file, memsqlctl.
overrides the default settings for the entire system.
Default location
/etc/memsql/memsqlctl.
Format
Settings
-
nodeMetadataFile
: The path to the state file, wherememsqlctl
stores the set of nodes on this host.This must be owned by the user specified by the user
option. -
defaultInstallDir
: The default installation directory for SingleStoreDB nodes created bymemsqlctl
.This must be owned by the user specified by the user
option.By default, a node’s data and directories are rooted in a base install directory, which is in the default install directory. To locate the default install directory on a host, run the memsqlctl env
command.Note: The
singlestoredb-server
/memsql-server
RPM and Debian packages configuredefaultInstallDir
to be/var/lib/memsql
.On hosts with a tarball-based installation, defaultInstallDir
defaults totarInstallDir/nodes
. -
user
: The username of the user that owns everything SingleStoreDB-related on this host.This includes defaultInstallDir
(and its contents),nodeMetadataFile
, and any state related to SingleStoreDB nodes (e.g. , memsql.
files, data directories, log files, etc.cnf ). This is also the user that will run memsqld
.To change this value, you will also need to update the permissions on all SingleStoreDB-related files and directories and restart all SingleStoreDB nodes on this host. -
sslCaFile
: The path to the certificate authority (CA) certificate file in the PEM format, which is used bymemsqlctl
to authenticate the SingleStoreDB server certificate on each node.The path can be absolute or relative to the location of the memsqlctl.
configuration file.hcl
Remarks
To prevent unintentionally running SingleStoreDB nodes as the root user, memsqlctl
will error unless you explicitly set user = "root"
in the memsqlctl.
configuration file.
The default installation process will create a memsql
service user and associated group (of the same name) which will run SingleStoreDB.memsqlctl
and nodes created by memsqlctl
on this host will be owned by the memsql
Linux user and group.
Example
The following example shows a memsqlctl.
file with the default values.
version = 1nodeMetadataFile = "/var/lib/memsql/nodes.hcl"defaultInstallDir = "/var/lib/memsql"user = "memsql"
memsqlctl State File (nodes. hcl)
The memsqlctl
state file (sometimes called the node metadata file
) contains information about SingleStoreDB nodes that exist on that host.
Included are the location of the memsql.
Default location
/var/lib/memsql/nodes.
Format
Remarks
If you get an error that you are missing your node metadata file, make sure the permissions are set correctly for this file.memsql
user must have access to it.
The location of this file can be overridden temporarily with the --node-metadata-file
command-line flag or permanently with the nodeMetadataFile
setting in memsqlctl.
Examples
Example 1 (empty)
The following is an empty state file.
version = 1
Example 2 (2 nodes)
The following is a state file for a host with two nodes.
version = 1node {memsqlConfigPath = "/var/lib/memsql/e3e100b7-f432-4129-b7f6-ebfc7d3993d3/memsql.cnf"password {cipherText = "sXDnREUKCJ3d2M1i6Nf2GGVVwfLqFiIvHy/Z6g=="}}node {memsqlConfigPath = "/var/lib/memsql/3825e8c8-5a5b-43f0-9162-8c8de242d661/memsql.cnf"password {cipherText = "J5t6bZiX+ktxWtifWbfOSBBrmTtd5PfrGOd3cA=="}}secure = "q9gqg4JLdUiCcbwUPEQVWCdjmWezRrYT2ruvXy42/I4="
Last modified: November 21, 2022