memsql.cnf (MemSQL configuration)

MemSQL node settings are configured in the memsql.cnf file, which is a compatible extension of MySQL’s my.cnf file.

This file is usually located in a MemSQL node’s base directory, i.e.: /var/lib/memsql/<unique_ID>/memsql.cnf. To find out the path for a specific MemSQL node, use the describe-node command, or if you are using MemSQL Ops, run the MEMSQL-PATH command.

Settings

The code listing below shows the default memsql.cnf file included with MemSQL.

  • For a basic MemSQL installation, this file is handled wholly MemSQL tools such as memsqlctl or MemSQL Ops. You should not need to change these settings at all.
  • For a customized installation, see the full list of MemSQL system variables in the System Variables topic.
  • To update MemSQL settings, we recommend using the update-config command, or if you are using MemSQL OPs, run the memsql-ops MEMSQL-UPDATE-CONFIG command.

Remarks

If you get an error that you are missing your MemSQL config file, make sure the permissions are set correctly for this file. By default, the “memsql” user must have access to it.

Examples

The following is an example of a memsql.cnf file for a node that is managed by memsqlctl.

[server]
auditlogsdir          = auditlogs
bind_address          = 0.0.0.0
datadir               = data
pid_file              = memsqld.pid
plancachedir          = plancache
port                  = 3306
tracelogsdir          = tracelogs
basedir               = .
core_file             = true
lc_messages_dir       = ./share
lock_wait_timeout     = 60
snapshot_trigger_size = 256m
socket                = memsql.sock
tmpdir                = .
transaction_buffer    = 64m

The following is an example of a memsql.cnf file for a node managed by MemSQL Ops.

; ------------------------------------------------------------------------
; THIS CONFIGURATION FILE IS MANAGED BY MEMSQL OPS
; MemSQL Ops controls the data in this file.  Please be careful
; when editing it.
; For more information, see our documentation at https://docs.memsql.com
; ------------------------------------------------------------------------
[server]
basedir = .
bind_address = 0.0.0.0
core_file
critical_diagnostics = off
default_partitions_per_leaf = 8
lc_messages_dir = ./share
lock_wait_timeout = 60
snapshot_trigger_size = 256m
socket = memsql.sock
tmpdir = .
transaction_buffer = 64m
; ------------------------------------------------------------------------
; MEMSQL OPS VARIABLES
;
; Variables below this header are controlled by MemSQL Ops.
; Please do not edit any of these values directly.
; ------------------------------------------------------------------------
port = 3306
Was this article useful?