Setting or Replacing a MemSQL License (MemSQL Ops)

This page describes how to replace your MemSQL license in a cluster managed by MemSQL Ops.


You should not use MemSQL-Ops license capacity (in RAM) as a source of truth if you have a newer unit-based license, because in our unit-based model, only leaf nodes are counted towards your license capacity limit; however, MemSQL-Ops will still count aggregators in its RAM calculation. As a result, it is expected that you might see an over-capacity warning in the Ops UI.

Setting a license

Using MemSQL Ops With Internet Access

In MemSQL Ops, navigate to Settings > Licenses. From that screen, you can add a new MemSQL license. MemSQL Ops will then update all nodes in your MemSQL cluster asynchronously to use the new license.

Or you can use the CLI LICENSE-ADD command to add a new license:

$ memsql-ops license-add --license-key <license key>

Using MemSQL Ops Without Internet Access

If you need to replace your MemSQL license and you do not have internet access, you will have to use the <license-file> argument instead of the above <license key> argument. For this to work, the license file will need to be on the host with the primary memsql-ops agent.

Use memsql-ops agent-list to check which node is the primary agent.

Then use the following command to add a new license:

memsql-ops license-add --license-file </path/to/file>

Without MemSQL Ops

This process is configuration error prone and we recommend that you use MemSQL Ops to update your license instead. Only use this option if MemSQL Ops is unavailable.

  1. On each node in your cluster, replace the existing license in /lib with your new license.
  2. On each node in your cluster, run:
$ sudo service memsql update-license <path to new license>

MemSQL Ops does not allow the addition of 3.2 licenses into MemSQL 4+ nodes.

MemSQL licenses issued before the MemSQL 4 launch may still work with MemSQL 4. That said, we recommend that users update their license to a new MemSQL license when possible.

If you need a new license, contact

Determining capacity and usage for your license

Using MemSQL Ops

The Status and License pages in the MemSQL Ops UI can be used to see your current usage compared against the total RAM capacity available for your license. Again, if you have a unit-based license, only the total RAM of your leaf nodes are counted towards your license capacity. The RAM calculation in the UI includes your aggregator nodes, which are not included, so you might see an over-capacity warning in the UI.

Using MemSQL directly

You can use SHOW STATUS EXTENDED LIKE "%capacity%" to see your license capacity compared to your current usage.

| Variable_name            | Value     |
| License_capacity         | 131072 MB |
| Maximum_cluster_capacity | 131072 MB |
| Used_cluster_capacity    | 13314 MB  |

License_capacity and Maximum_cluster_capacity is your allowed capacity, while Used_cluster_capacity shows what you have used against the capacity. In the example above, 13 GB out of 131 GB of RAM capacity has been used. Aggregator and leaf RAM usage is included in Used_cluster_capacity.

To understand how nodes, host machines, and license units relate to each other, see the MemSQL FAQ.


Unlike MemSQL Ops, MemSQL Studio integrates with both RAM-based and unit-based licenses for reporting on capacity versus licensed usage. You can install and use MemSQL Studio with existing clusters managed by MemSQL Ops, or use Studio in new deployments managed by the new MemSQL management tools.

Was this article useful?