Development notes

Thoughts, notes and ideas about development

How to fix login issue with Grafana

2020-04-25 Alexey Bogdanov

This post describes how to restore the admin's user password for Grafana installed with sqlite.

For other SQL databases, connection to DB will look differently but SQL query may be used the same.

Log in to the remote server where Grafana is installed.

Install any tool for sqlite. I’ll use a console client sqlite3

sudo apt install sqlite3

Connect to Grafana DB file by specifying the path to DB file:

sqlite3 ~/data/grafana/grafana.db

Update ~/data/grafana/ to the relevant path to the Gafana DB file.

Update password Admin’s password to admin:

update user 
    set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', 
    salt = 'F3FAxVm33R' where login = 'admin';

In case if admin user was renamed to smth else, replace login = 'admin'; with the relevant username.

Try to login to Grafana with username admin and password admin. It may ask to change the password.

Other SQL Databases

Connect to the DB and use the SQL query provided above.

comments powered by Disqus