Skip to content

How to rotate the database master password ? #805

Description

@vyrenlife-source

CloudPanel version(s) affected

2.5.4

Description

CloudPanel 2.5.4, clpctl 6.0.8, Ubuntu 26.04 LTS,
MySQL 8.4.10 listening on 127.0.0.1 only.

I need to rotate the database master password (the one shown by
clpctl db:show:master-credentials). I could not find a supported
way to do it and would rather ask than guess.

What I checked:

  1. clpctl lists these under db:
    db:show:master-credentials, db:add, db:export, db:import,
    db:delete. There is no db:change:master-password or equivalent.

  2. The UI does not appear to offer it either, unless I have missed
    where it lives.

  3. Looking at
    src/Command/DatabaseShowMasterCredentialsCommand.php, the value
    comes from $databaseServer->getDecryptedPassword(), and the
    database_server row stores the password encrypted. So changing
    it on the MySQL side alone would leave CloudPanel unable to
    connect, and writing the encrypted value directly seems like
    something I should not be doing by hand.

Question: is there a supported way to rotate this password on 2.5.4 ΓÇö
a command, a UI action, or a documented procedure? If the answer is
"not currently supported", that is a useful answer too, and I will
plan around it.

Context, in case it matters: the current password was exposed in a
place it should not have been (my own mistake, not a CloudPanel
issue). Nothing is compromised ΓÇö MySQL listens only on 127.0.0.1 and
3306 is closed at the firewall ΓÇö but I would still prefer to rotate
it properly rather than leave it.

How to reproduce

This is a usage question rather than a bug, so there is nothing to
reproduce in the usual sense. The steps that show the gap:

  1. Run clpctl and look at the db namespace — there is
    db:show:master-credentials but no command to change the master
    password.
  2. Check the admin UI — I could not find such an action there either.

Possible Solution

A db:change:master-password command, or a documented manual
procedure. "Not currently supported" is also a useful answer.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions