You are viewing an older version of this section. View current production version.
Memsqlctl Config File (memsqlctl.hcl)
This topic does not apply to MemSQL Helios.
The memsqlctl config file, memsqlctl.hcl overrides the default settings for the entire system.
Default location
/etc/memsql/memsqlctl.hcl
Format
Settings
-
nodeMetadataFile: The path to the state file, where memsqlctl stores the set of nodes on this host. This must be owned by the user specified by theuseroption. -
defaultInstallDir: The default installation directory for SingleStore DB nodes created bymemsqlctland owned by the user specified in theusersetting. 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 thememsqlctl envcommand.Note: The
memsql-serverRPM and Debian packages configuredefaultInstallDirto be/var/lib/memsql. On hosts with a tarball-based installation,defaultInstallDirdefaults totarInstallDir/nodes. -
user: The username of the user that owns everything MemSQL-related on this host. This includesdefaultInstallDir(and its contents),nodeMetadataFile, and any state related to MemSQL nodes (e.g.,memsql.cnffiles, data directories, log files, etc.). This is also the user that will runmemsqld. To change this value, you will also need to update the permissions on all MemSQL-related files and directories and restart all MemSQL nodes on this host. -
sslCaFile: The path to the certificate authority (CA) certificate file in the PEM format, which is used bymemsqlctlto authenticate the SingleStore DB server certificate on each node. The path can be absolute or relative to the location of thememsqlctl.hclconfiguration file.
Remarks
To prevent unintentionally running MemSQL nodes as the root user, memsqlctl will error unless you explicitly set user = "root" in the memsqlctl.hcl configuration file.
The default installation process will create a memsql service user and associated group (of the same name) which will run MemSQL. All state owned by memsqlctl and nodes created by memsqlctl on this machine will be owned by the memsql linux user and group.
Example
The following example shows a memsqlctl.hcl file with the default values.
version = 1
nodeMetadataFile = "/var/lib/memsql/nodes.hcl"
defaultInstallDir = "/var/lib/memsql"
user = "memsql"