How Do I Reset the Password Without Restarting a DB Instance?
In cloud resource (such as ECSs and BMSs) management, if you need to change the password of the host account and prevent the instance from being restarted (to avoid service interruption), you can use the public scripts provided by COC to change the password without restarting the instance. Currently, ECSs and BMSs are supported. The operation procedure is as follows:

When running a public script on COC, you need to select an instance. The prerequisites for selecting an instance are as follows:
The resource instance information has been synchronized to COC. For details, see Synchronizing Resources.
The UniAgent has been installed for the instance and is running properly.
To install the UniAgent on an instance, you need to provide the administrator account and password of the instance. If UniAgent is not installed on the resource instance and you forget the password, UniAgent cannot be installed and the public script for changing the password cannot be executed.
A Linux ECS is used as an example to describe how to change the password of user root.
- Log in to COC.
- In the navigation pane on the left, choose Resource O&M > Automated O&M.
- In the Routine O&M area, click Script Management.
- On the Public Scripts tab page, locate the script for changing password of the administrator account and click Execute in the Operation column.
- Enter a new password. (The password must meet the password rule, for example, the password must contain 8 to 30 characters, including uppercase letters, digits, and special characters.)
- Add the target ECS.
- Click OK. The system remotely delivers the script to the instance and automatically runs the script. You do not need to log in to the instance terminal during the process.
After the script is executed, you can use the new password to log in to the instance using SSH. The instance is in operation during the entire process.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot