Dedicated Admin Connections

To log in to a dedicated admin connection, you should first log in to the machine where the master aggregator is running. If a master aggregator is not running, then log into a child aggregator.

Then execute:

singlestore -u root --socket '/<installationpath>/data/memsql.sock' -p


You can use either the SingleStore command-line tool or the MySQL command line tool.

This uses a Unix domain socket to designate that this is a dedicated admin connection. This is only available in the file system and cannot be used over a network, which is why you must log on to the aggregator before connecting using this method.

Once you log in, if commands do not run, you can kill connections and queries to free resources to allow others to connect to the system.

A similar approach will also allow you to log on to a leaf node directly, if necessary. The connection is node-local.

Here is an example of how to setup a dedicated admin connection:

sh-4.4# cd /var/lib/memsql
sh-4.4# ls
5871bce2-e2fa-4934-ad92-5fb842c74fef a36fb148-c8e2-4132-a7cd-c7694e43336d nodes.hcl nodes.hcl.lock
sh-4.4# cd a36fb148-c8e2-4132-a7cd-c7694e43336d/
sh-4.4# ls
auditlogs data memsql.cnf plancache tracelogs
sh-4.4# cd data
sh-4.4# ls
blobs ingest_staging memsql_id roots staging_bottomless
datetime_to_version logs memsql_proxy.sock snapshots tempblobs
ephemeral_errors memsql.sock memsql_role persisted_errors spill temprestoreblobs
sh-4.4# ls -tla memsql_proxy.sock
srwxrwxrwx 1 memsql memsql 0 Nov 4 22:03 memsql_proxy.sock
sh-4.4# pwd
sh-4.4# singlestore -u root --socket '/var/lib/memsql/a36fb148-c8e2-4132-a7cd-c7694e43336d/data/memsql.sock' -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 58
Server version: 5.7.32 MemSQL source distribution (compatible; MySQL Enterprise & MySQL Commercial)
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

The engine variable, max_dedicated_admin_connections, determines the number of dedicated admin connections allowed. Default is 5.

Last modified: April 27, 2023

Was this article helpful?