Changing the Root Password

You should use the Toolbox to change the root password in a cluster.

All the steps can be done online, it is not necessary to restart the cluster or the host systems to update the root password. Sync_permissions variable is enabled in this scenario.

The recommended steps are as follows:

Step 1: Verify all hosts and nodes are online and connected to the cluster by running the sdb-admin list-nodes command.

Step 2: Execute sdb-admin change-root-password using the --memsql-id flag with the node ID of the Master Aggregator, and the --all flag to update all nodes in the cluster.

This will update the root password on each host and make it in sync across the cluster.

Step 3: Check the status from the master aggregator ssh session by executing sdb-admin list-nodes

If the Connectable column in the output shows the status as 'False', then the following additional steps will have to be performed.

Step 3.1: Connect directly to the problem host via ssh and verify that the root password is correct. Note that you may have to use the old root password.

Step 3.2: Connect to the local SingleStore database and verify the 'root'@'localhost' password is correct using the singlestore CLI. If the password has not been updated then update the password by executing:

GRANT ALL ON . TO 'root'@'localhost' IDENTIFIED BY '<<NEW PASSWORD>>' WITH GRANT OPTION;

Step 3.3: Ensure that the local memsqlctl account has the updated password. SSH to the host and execute the following command with 'localhost' set as the target host.

sudo memsqlctl change-root-password --password <<'root'@'localhost' password>>;