[release-11.5.6] Docs: Adding clarification for resetting admin password (#106561)

Docs: Adding clarification for resetting admin password (#106108)

* Docs: Adding clarification for resetting adming password with CLI with external DB

* adjusting bulleted points

* Cutting unneeded wording

* adjusting wording to avoid Grafana being possessive

* Changing Postgres to PostgreSPQL

(cherry picked from commit 3c6146fd95)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
pull/106568/head
grafana-delivery-bot[bot] 2 weeks ago committed by GitHub
parent 98bb22c423
commit e624f24f4b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      docs/sources/cli.md

@ -223,7 +223,7 @@ To correct this, use the `--homepath` global option to specify the Grafana defau
grafana cli --homepath "/usr/share/grafana" admin reset-admin-password <new password>
```
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the Server Admin > User tab.
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the **Server Admin > User** tab.
If you need to set the password in a script, then you can use the [Grafana User API](../developers/http_api/user/#change-password).
@ -235,6 +235,19 @@ If you installed Grafana using Homebrew, you can reset the admin password using
/opt/homebrew/opt/grafana/bin/grafana cli --config /opt/homebrew/etc/grafana/grafana.ini --homepath /opt/homebrew/opt/grafana/share/grafana --configOverrides cfg:default.paths.data=/opt/homebrew/var/lib/grafana admin reset-admin-password <new password>
```
#### Reset admin password for Grafana deployed with Grafana Operator and using an external database
If you deploy Grafana with Grafana Operator and configure Grafana to use an external PostgreSQL or MySQL database, specify both the homepath and configuration file in your command:
```bash
grafana cli --homepath /usr/share/grafana --config /etc/grafana/grafana.ini admin reset-admin-password <new password>
```
If you don't do this, the CLI:
- Won't see the database connection information since it's in a directory outside of the Grafana homepath
- Will configure the default SQLite database in `/var/lib/grafana` and reset that password instead of for your external database
### Migrate data and encrypt passwords
`data-migration` runs a script that migrates or cleans up data in your database.

Loading…
Cancel
Save