MemSQL Cluster Installation without sudo access



I remember installed the MemSQL 6.5 without sudo access using the memsql-ops tools. I see with 6.7 Ops is being deprecated and now I see the prerequisites says non-root user with sudo access is required

I know it is recommended and simple to deploy/install the MemSQL using sudo access. But wanted to check whether MemSQL can be installed without sudo access? if yes, please share any link that guides the process


Memsql-ops vs memsql tools Permissions

also I see the below link for complete manual installation (FULL), when there is no sudo access and no internet access for Primary Host.

But I see this is using MemSQL Ops, isn’t MemSQL Ops deprecated as of MemSQL 6.7? is there any option to install without sudo



Hello Madhu! Sorry you have hit this issue. We are actively building out a full installation guide which will address your needs for installation without sudo.

In the meantime, using toolbox with memsql-server without sudo is actually not too hard. Follow these steps to get started:

  1. Download the MemSQL Server tarball for the latest release. You can lookup the relative path on our release server at the following URL:
    • look for the section memsql-server-tar in that document and append the Path attribute to the url to download the latest tarball.
  2. Unpack the tarball on every host in your cluster wherever you want to install MemSQL
    • Make sure that the user you will SSH into the node owns the unpacked installation directory
    • It’s easiest if you unpack memsql-server into the same location on every host
  3. Create a directory on each host where you want MemSQL data to live, inside this directory add two files:
Name the first file "memsqlctl.hcl" with contents:
version = 1
defaultInstallDir = "PATH TO THIS DIRECTORY"

Name the second file "nodes.hcl" with contents:
version = 1
  1. Install toolbox on your command + control host. If you need to install toolbox without sudo you can get the latest tarball from a similar release url:
  2. Register each host using memsql-toolbox-config register-host
    • IMPORTANT: specify the additional flags --memsqlctl-path and --memsqlctl-config-path
    • --memsqlctl-path should be an absolute path to the memsqlctl binary which was unpacked when you unpacked the memsql-server tarball
    • --memsqlctl-config-path should be an absolute path to the memsqlctl.hcl file you created on each host
  3. At this point you can run any memsql-admin command to operationalize your MemSQL Cluster.
    • some starting commands are create-node, add-leaf, bootstrap-aggregator, and add-aggregator
    • check memsql-admin --help for more
  4. NOTE: memsql-deploy commands currently will not work with this setup - we are making tarball installations first class as we speak which should be released in the next month or so. In the meantime this more manual installation process is the best option for running without sudo privileges.

Let us know if you run into any issues. We are working hard to make this particular experience much better.

Memsql Installation on different Port

Thank you @carl, this is very useful

However I had encounter the issue and error thrown while creating the node and details are below

[madhu@md-3mem-mstr memsql-toolbox]$ ./memsql-admin create-node --host  --password zzzzz --datadir /home/madhu/memsql_base/memsql-data/
could not determine memsqlctl user: error running memsqlctl: failed to start command: `"/home/madhu/memsql_base/memsql-server-6/" "--json" "--yes" "--config" "/home/madhu/memsql_base/memsql-d/" "env"`: fork/exec /home/madhu/memsql_base/memsql-server-6/: permission denied

The below are the commands that used for registering the hosts

memsql-toolbox-config register-host --localhost --host --memsqlctl-path /home/madhu/memsql_base/memsql-server-6/ --memsqlctl-config-path /home/madhu/memsql_base/memsql-d/


memsql-toolbox-config register-host --identity-file ~/clusterkey --host --memsqlctl-path /home/madhu/memsql_base/memsql-server-6/ --memsqlctl-config-path /home/madhu/memsql_base/memsql-d/

MemSQL Server is extracted into the path: /home/madhu/memsql_base/memsql-server-6/

memsqlctl.hcl and nodes.hcl are created in the path /home/madhu/memsql_base/memsql-d/

Contents of memsqlctl.hcl

[madhu@md-3mem-mstr memsql-d]$ cat memsqlctl.hcl
version = 1
user = "madhu"
defaultInstallDir = "/home/madhu/memsql_base/memsql-d/"

tried with and without quotes around user and path
madhu – is the OD user that is used to install

kindly suggest, where did I go wrong


Memsqlctl command not found

Hi @carl

did you get a chance to look at the issue that I had high-lighted



Madhu, sorry for the delay.

As a general note before I discuss your actual issue, it will help if you use triple-backticks to format code. You can learn more about formatting posts on this page: I have updated your post with code blocks.

The issue is that --memsqlctl-path needs to point at the memsqlctl binary, not the directory in which it is contained. This is not clear - I just filed an internal ticket to have a future version of Toolbox error if you pass a path which does not resolve to a memsqlctl binary. To fix your issue please append memsqlctl to the path like so:

register-host ... --memsqlctl-path /home/madhu/memsql_base/memsql-server-6/memsqlctl ...

Note, this issue also exists for the --memsqlctl-config-path. The config path needs to point at a file, not the directory containing the file.

The last thing I will note is that:

  • by default each node will be installed into the defaultInstallDir under a unique path, something like this: $defaultInstallDir/12312312312312312321312312
  • by default, each node’s data directory will be in the above path, so in the above case it would be: $defaultInstallDir/12312312312312312321312312/data
  • if you specify a custom data directory make sure you are only using it for a single MemSQL node - multiple MemSQL nodes can not share the same data directory.

Let me know if that works!


Thank you @carl , this is very helpful

I am able to install the MemSQL without sudo, I had do little more tweaking to the memsqlctl.hcl file. I had to add the path of the node.hcl file.
Please see the last line that I had added, otherwise it was searching for node.hcl file in the /var/lib/memsql/ directory

updated memsqlctl.hcl file that I had used

version = 1
user = "madhu"
defaultInstallDir = "/home/madhu/memsql_base/memsql-d"
nodeMetadataFile = "/home/madhu/memsql_base/memsql-d/nodes.hcl"

Now I have got one last query, where will be the memsql binary located at?



Ah, thanks for that! I forgot we don’t resolve the node metadata file relative to the defaultInstallPath. That was an explicit decision due to some users wanting to move one but not the other.

The memsql binary is called memsqld and it is collocated with the memsqlctl binary which you installed when you unpacked the memsql-server tarball. memsqlctl runs the memsqld that it is installed alongside for each of the locally defined MemSQL nodes.


Thank you @carl

I have started the nodes using memsql-admin and I see the there is no memsql executable in the installation to start the MemSQL shell. Not sure how do I access the MemSQL Shell

I used to use the below command to connect MemSQL
memsql -u root -h -P 3306 --prompt="memsql> " -p

please advise



Did you install the memsql-client package?


Thank you @jack

all good and I am able to connect to MemSQL