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. 

    • Related Articles

    • Changing a birthday image

      Requirements           1.   IP address, username,password of the server.          2.  MySQL  password and username Procedure          Step 1:   Firstly, log into the server using appropriate credentials.                                   ssh -o ...
    • OS to Enterprise Data Migration Tool

      The steps that need to be followed are attached below clearly. Please note that base on the enterprise version that the system is going to upgrade, some steps and fields will change. (Ex code base, versions etc) Please find the deployment guide from ...
    • Add doner in Gender Links instance

      Gender Links is a custom client. There can be a configuration request to "Add Doner", This needs to be added from the back end  1. Backup the database backup_db /var/www/html/OHRMStandalone/PROD/genderlinks/ 2. Insert the below query INSERT INTO ...