Recover your grafana admin password using sqlite shell

Juan Enciso
Juan Enciso
IT Architect, SRE Engineer, DevOps Tools Trainer
Jan 13, 2018 1 min read
thumbnail for this post

One day you can lose your grafana admin password and probably you will desire to recover it rather than reinstall. If your grafana has been using sqlite as backend storage, the recover process is easy. Here are the steps to do that:

  1. In your local machine, install the sqlite3 package
sudo apt-get install sqlite3
  1. Login into your sql database
sudo sqlite3 /var/lib/grafana/grafana.db
  1. Reset the admin password using SQL update (the new password will be admin)
sqlite> update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';
sqlite> .exit

Now, you could login in your grafana web interface using username: admin and password: admin



comments powered by Disqus