Manage passwords¶
Charmed MySQL user credentials are managed with Juju’s get-password and set-password actions.
See also
Get password¶
To retrieve user credentials for the root user, run the get-password action on the leader unit as follows:
juju run mysql-k8s/leader get-password
To retrieve credentials for a different user:
juju run mysql-k8s/leader get-password username=<username>
Set password¶
To change the root user’s password to a new, randomized password:
juju run mysql-k8s/leader set-password
To set a manual password for the root user:
juju run mysql-k8s/leader set-password password=<password>
To set a manual password for another user:
juju run mysql-k8s/leader set-password username=<username> password=<password>