update-config

Change a configuration value for one or all MemSQL Nodes on the local machine.

Usage

Usage:
  memsqlctl update-config [flags]

Flags:
      --all                 Update all nodes on this host
  -h, --help                help for update-config
      --key string          The configuration key to update
      --memsql-id strings   MemSQL ID to modify
      --reset               Restore the setting to the default value
      --set-global          Execute the associated SET GLOBAL statement
      --value string        The value to set for the key

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

If neither --memsql-id nor --all is specified, memsqlctl will prompt the user to select a node from a table list of nodes.

For the target MemSQL nodes, memsqlctl will add the new key-value pair (or overwrite an existing value) to their MemSQL configuration files. If --set-global is specified, memsqlctl will connect to the node (if the process is running) and run SET GLOBAL key=value. If --delete is specified, it will delete the existing key and value.

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

Output

The following sets the general_log system variable on all nodes on the local machine through the update-config command.

$ sudo memsqlctl update-config --all --set-global --key "general_log" --value "PARTIAL"
memsqlctl will perform the following actions:
  · Update configuration setting on node with MemSQL ID 179062CAEEBCBDA755B75297BF6D9B2AE4C98FB7 on port 3306
    - Execute command `SET GLOBAL general_log=PARTIAL`
    - Update MemSQL config file with setting general_log=PARTIAL

  · Update configuration setting on node with MemSQL ID E31F8D60BA422D0DC1C82C0BE274C7DC51F6A754 on port 3307
    - Execute command `SET GLOBAL general_log=PARTIAL`
    - Update MemSQL config file with setting general_log=PARTIAL

Would you like to continue? [y/N]: y
✓ Executed SET GLOBAL command on node with MemSQL ID 179062CAEEBCBDA755B75297BF6D9B2AE4C98FB7
✓ Updated MemSQL config file for node with MemSQL ID 179062CAEEBCBDA755B75297BF6D9B2AE4C98FB7
✓ Executed SET GLOBAL command on node with MemSQL ID E31F8D60BA422D0DC1C82C0BE274C7DC51F6A754
✓ Updated MemSQL config file for node with MemSQL ID E31F8D60BA422D0DC1C82C0BE274C7DC51F6A754
Was this article useful?