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
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:
look for the section memsql-server-tar in that document and append the Path attribute to the url release.memsql.com/ to download the latest tarball.
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
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
user = "LINUX USER WHO SHOULD RUN MEMSQL"
defaultInstallDir = "PATH TO THIS DIRECTORY"
Name the second file "nodes.hcl" with contents:
version = 1
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
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
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.
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: Markdown Reference. 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:
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.
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.
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 127.0.0.1 -P 3306 --prompt="memsql> " -p