Changing Your Database Password

Changing the MySQL password for your database service also affects the other services that must connect to the database.


Updating your database password requires a period of downtime for you to restore a backup to your database service, and then restart all of your services. Plan ahead to make time for this before rotating your database password.

Creating a Backup

If you are changing the password for a production environment, then you must ensure you have an up-to-date backup so you can restore it after the update.

To create a backup for any environment, click Backups from the menu on the left:

Navigate to your chosen environment's Backups page.

Then, click Backup Now on the Backups page:

Click Backup Now to create a new backup.

Changing the Database Password

The database password is changed directly using the secrets feature within your chosen environment. However, for the database password secret, you must follow additional steps to ensure that your services update correctly with the new value.

When you are ready, follow these steps to change your database password:

  1. Navigate to your chosen environment.

  2. Click Settings from the menu on the left:

    Navigate to your environment's Settings page.

  3. In the Secrets section, click Edit… from the Actions menu beside the lcp-secret-database-password secret:

    Edit the lcp-secret-database-password secret.

  4. In the Value section, click Show beside the value to reveal the secret and enable editing.

    Show the secret to enable editing it.

  5. Edit the value of the secret.

  6. Scroll down and check all of the boxes acknowledging the effects of changing the value of the secret.

    Check the boxes to enable the Publish secret button.

  7. Click Publish secret.


    The services attempt to restart when you click Publish secret. However, the database service can only update its password upon image creation, so the service must be deleted and redeployed to update it.

  8. Return to your environment’s Services page.

  9. From the Actions menu for the database service, click Delete Service.

    Delete the service so it can be redeployed and start up with the updated password.

  10. Open a command prompt within your local clone of the repository.

  11. Deploy the database service to your environment using the command-line interface:

    cd database
    lcp deploy
  12. If you are not already logged in, enter y at the prompt and authenticate with your browser.

  13. When prompted, enter the number corresponding to your environment:

    #      Project             Status
    1      lfrlearn-infra      Ready
    2      lfrlearn-uat        Ready
    3      lfrlearn-dev        Ready
    4      lfrlearn-prd        Ready
    ? Type a number (#) or project name: 2

    The database service starts up using the updated password. The liferay and backup services restart to reconnect to the database service with the correct password, as well.

  14. If you prepared a backup, then navigate to your chosen environment’s Backups page, and restore the backup.

Your database service is now updated with a new password, and your other services are synchronized to connect to it properly.

Additional Information