How to change encrypted mysql password in databases.yml

How to change encrypted mysql password in databases.yml

Updating any encrypted database password of database.yml files can be done following the below steps.
Login to Support repo and check out 'db-password-encrypt' task from below path. 
 Copy DBPasswordEncryptTask.class.php to: 
  1. <web root>/symfony/plugins/orangehrmCorePlugin/lib/task/
Run the below symfony command
  1. sudo php symfony cc
 Run the following symfony task with the new password. --new-username option is optional, use it when you need to change the username as well
  1. sudo php symfony orangehrm:DBPasswordEncrypt --new-password="[password here]" --new-username="root"
Remove the  DBPasswordEncryptTask.class.php from <web root>/symfony/plugins/orangehrmCorePlugin/lib/task/ and run the following Symfony commands:
  1. sudo php symfony cc
  2. sudo php symfony d:build-model
  3. sudo php symfony o:publish-assets 
Open the database.yml file and check if the password and/or username is updated.