Setting the Root Password
The IBM Cloud® Databases for etcd service is provisioned with a root user.
You must set the root password before you can use it to connect. To set the password through the IBM Cloud dashboard, select Manage from the service dashboard to open the management panel for your service. Open the Settings tab, and use the Change Database Admin Password panel to set a new root password.
{: caption="Figure 1. The Change Database Admin Password Panel in Settings" caption-side="bottom"}
Setting the root password from the command line
Use the cdb user-password
command from the Cloud Databases CLI plug-in to set the root password with the command line.
For example, to set the root password for a deployment named "example-deployment", use the following command.
ibmcloud cdb user-password example-deployment root <newpassword>
Setting the root password from the API
The Foundation Endpoint that is shown on the Overview panel of your service provides the base URL to access this deployment through the API. Use it with the /deployments/{id}/users/{username}
endpoint to set the
root password.
curl -X PATCH `https://api.{region}.databases.cloud.ibm.com/v4/ibm/deployments/{id}/users/root' \
-H "Authorization: Bearer $APIKEY" \
-H "Content-Type: application/json" \
-d '{"password":"newrootpasswordsupersecure21"}'
For more information, see the API Reference.