Outdated Version

You are viewing an older version of this section. View current production version.

Uninstalling MemSQL min read


MemSQL Ops has been deprecated

Please follow this guide to learn how to migrate to SingleStore tools.

Select a method to uninstall MemSQL

  • If your cluster was installed using MemSQL Ops, and is currently managed by MemSQL Ops, select “Uninstall using MemSQL Ops.”

  • If you cluster was installed using MemSQL Ops and was later migrated to using MemSQL tools, and/or is currently managed by MemSQL tools, select “Uninstall using MemSQL Tools.”

  1. Use MemSQL Ops to list all running nodes.

    memsql-ops memsql-list
    ****
     ID       Agent Id  Process State  Cluster State  Role        Host        Port  Version 
     44CDE71  A0c8a89   RUNNING        CONNECTED      MASTER      10.0.0.98   3306  x.x
     3FD3FCF  Aa5eab9   RUNNING        CONNECTED      AGGREGATOR  10.0.0.133  3306  x.x
     9C0841F  A04f65f   RUNNING        CONNECTED      LEAF        10.0.0.236  3306  x.x
     9A551DA  A5f0572   RUNNING        CONNECTED      LEAF        10.0.0.136  3306  x.x
    
  2. Use MemSQL Ops to stop monitoring each MemSQL node.

    Use the IDs from the ID column in the MemSQL Ops output.

    Note: Do not remove the leaf nodes if prompted.

    Master Aggregator

    memsql-ops memsql-unmonitor 44CDE71
    ****
    2019-07-02 16:30:23: J9fe705 [INFO] Stopping monitoring for MemSQL node ABECB9CFBB84C5369982BE10A85EC050D20486B0
    2019-07-02 16:30:23: J9fe705 [INFO] No longer monitoring MemSQL node ABECB9CFBB84C5369982BE10A85EC050D20486B0
    

    Child Aggregator

    memsql-ops memsql-unmonitor 3FD3FCF
    ****
    2019-07-02 16:30:54: J6fb0f3 [INFO] Stopping monitoring for MemSQL node 4DF1BC43819C21D33B6D6AAE02C8851F40709FDF
    2019-07-02 16:30:54: J6fb0f3 [INFO] No longer monitoring MemSQL node 4DF1BC43819C21D33B6D6AAE02C8851F40709FDF
    

    Leaf 1

    memsql-ops memsql-unmonitor 9C0841F
    ****
    Would you additionally like to remove the leaf node from the MemSQL cluster? (You can specify this behavior with --remove-leaf.) [y/n] n
    2019-07-02 16:31:22: J2eae2d [INFO] Stopping monitoring for MemSQL node AF1C3A169BFE4FD792163909BDB592C65D0E37AF
    2019-07-02 16:31:22: J2eae2d [INFO] No longer monitoring MemSQL node AF1C3A169BFE4FD792163909BDB592C65D0E37AF
    

    Note: If a leaf is removed unintentionally, connect to the database and run ADD LEAF to add it back to the cluster: For example, on the Master Aggregator: memsql> ADD LEAF 'root'@'<leaf-node-host-IP>':3307

    Leaf 2

    memsql-ops memsql-unmonitor 9A551DA
    ****
    Would you additionally like to remove the leaf node from the MemSQL cluster? (You can specify this behavior with --remove-leaf.) [y/n] n
    2019-07-02 16:32:01: J52843c [INFO] Stopping monitoring for MemSQL node 143B60B39072A9E9C16D2D8ACC16E6997286079E
    2019-07-02 16:32:01: J52843c [INFO] No longer monitoring MemSQL node 143B60B39072A9E9C16D2D8ACC16E6997286079E
    

    Note: If a leaf is removed unintentionally, connect to the database and run ADD LEAF to add it back to the cluster: For example, on the Master Aggregator: memsql> ADD LEAF 'root'@'<leaf-node-host-IP>':3307

  3. Use MemSQL Ops to confirm that all MemSQL nodes are no longer monitored.

    memsql-ops memsql-list
    ****
    No MemSQL nodes were found.
    
  4. Remove MemSQL Ops.

    sudo memsql-ops agent-uninstall --uninstall-ops-only --all
    ****
    This will completely delete all MemSQL Ops agents in the cluster, including this one. This operation will delete all MemSQL Ops data in the cluster and cannot be undone.
    If you want to delete all MemSQL Ops agents, please type the word DELETE: DELETE
    2019-09-06 13:58:23: J91ad35 [INFO] Deleting MemSQL Ops agent Ae9f037643ccf4b5fb3b0c03f2dd0da58
    2019-09-06 13:58:23: J4cc070 [INFO] Deleting MemSQL Ops agent Ae2838b5fd2164d3a8691ad71227beee3
    2019-09-06 13:58:23: Jfb011f [INFO] Deleting MemSQL Ops agent Afea25a7c3e184241acdf5296f429298d
    2019-09-06 13:58:27: J4cc070 [INFO] Successfully deleted MemSQL Ops agent Ae2838b5fd2164d3a8691ad71227beee3
    2019-09-06 13:58:27: Jfb011f [INFO] Successfully deleted MemSQL Ops agent Afea25a7c3e184241acdf5296f429298d
    2019-09-06 13:58:27: J91ad35 [INFO] Successfully deleted MemSQL Ops agent Ae9f037643ccf4b5fb3b0c03f2dd0da58
    WARNING: An unmonitored MemSQL node may still exist on this machine.  It had host 172.16.212.165 and port 3306 the last time MemSQL Ops connected to it.
    Stopping MemSQL Ops
    Waiting up to 60 seconds for a clean exit.
    Done.
    Successfully uninstalled MemSQL Ops
    

Depending on which version of MemSQL tools you use to manage your cluster, you may remove the existing cluster either by a single command, or via sequence of commands.

Removing an existing cluster can be useful for deploying a new MemSQL cluster in its place, or after moving the existing cluster to another set of hosts.

Using either method, the MemSQL tools-related binaries (MemSQL client, MemSQL Toolbox, and MemSQL Studio) can safely be deleted once the MemSQL cluster has been removed. If you plan to deploy a new MemSQL cluster, there is no need to delete these binaries.

MemSQL Toolbox 1.6.4 and later

As of MemSQL Toolbox 1.6.4, you may use a single command to remove a MemSQL cluster. The command will delete all data, delete all MemSQL nodes, and unregister all hosts.

Alert

Removing a MemSQL cluster with this command is irreversible.

Run the following command on the Master Aggregator and follow the prompts to remove the cluster.

memsql-deploy destroy-cluster

Refer to memsql-deploy destroy-cluster for more information.

MemSQL Toolbox 1.6.3 and earlier

If you’re using MemSQL Toolbox 1.6.3 or earlier to manage your MemSQL cluster, run the following commands in the following sequence to remove a MemSQL cluster.

  1. Stop all MemSQL nodes and delete them.

    memsql-admin delete-node --all --stop
    
  2. Uninstall all versions of MemSQL.

    memsql-deploy uninstall --all --all-versions
    
  3. Unregister all MemSQL hosts.

    memsql-toolbox-config unregister-host --all
    
  4. Confirm that MemSQL has been uninstalled.

    memsql-toolbox-config list-hosts