@@ -222,39 +222,32 @@ Full method
222
222
223
223
2. Update the value of ``grafana_admin_password `` in ``passwords.yml ``
224
224
225
- 3. Exec into the Grafana container on a controller
225
+ 3. Exec into the MariaDB container on a controller then login to MariaDB
226
226
227
227
.. code :: bash
228
228
229
- sudo docker exec -it grafana bash
230
-
231
- 4. Run the password reset command, then enter the new password
232
-
233
- .. code :: bash
229
+ sudo docker exec -u 0 -it mariadb bash
230
+ (mariadb) mysql grafana -p
231
+ # Enter database password when prompted
234
232
235
- grafana-cli admin reset-admin-password --password-from-stdin
233
+ 4. Query for the ID of `` grafana_local_admin ``
236
234
237
- .. note ::
235
+ .. code :: sql
238
236
239
- If you see an error ``Error: ✗ could not read user from database. Error: user not found ``
240
- from Grafana CLI, it means that the ID of ``grafana_local_admin ``
241
- is not 1 (The default value used with password reset command).
242
- You can find the ID of ``grafana_local_admin `` by accessing MariaDB.
237
+ SELECT id,login FROM user WHERE login = "grafana_local_admin";
238
+ # Take a note of this ID
243
239
244
- .. code :: sql
240
+ 5. Exec into the Grafana container on a controller
245
241
246
- # Enter MariaDB with
247
- docker exec -u 0 -it mariadb bash
248
- mysql grafana -p
249
- # Enter database password when prompted
242
+ .. code :: bash
250
243
251
- SELECT id,login FROM user WHERE login = "grafana_local_admin";
244
+ sudo docker exec -it grafana bash
252
245
253
- Once you get the ID, run the password reset with user-id option
246
+ 6. Run the password reset command, then enter the new password
254
247
255
- .. code :: bash
248
+ .. code :: bash
256
249
257
- grafana-cli admin reset-admin-password --user-id < id> --password-from-stdin
250
+ grafana-cli admin reset-admin-password --user-id < id> --password-from-stdin
258
251
259
252
12. Update the MariaDB database password
260
253
0 commit comments