How to reset lost admin password in grafana?

  • What Grafana version and what operating system are you using?
    version 10.0.0

  • What are you trying to achieve?
    Reset lost admin password

  • How are you trying to achieve it?
    Tried below command.

grafana-cli admin reset-admin-password admin


  • What happened?
    But failed - as above screenshot.

  • What did you expect to happen?
    Reset password.

So what have I done incorrectly in here? Please advise, many thanks. :slight_smile:

Hi - is there any folks in here would help on this?
Many thanks. :slight_smile:


re-execute the command with sudo


I’ve tried to run it by sudo but still got no luck on it.
It complains unable to open database file: no such file or directory.


Try this solution:

Locate the database file grafana.db. It should be somewhere in /var/lib/grafana.

  • Connect to the database.
    $ sqlite3 /path/to/grafana.db
  • Check for admin login.
    sqlite> select * from user;
  • Update the user’s password.
    update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';
    *The password is “admin”.

Yes it works after I extend the disk space as well.
My first attempt was failed because of insufficent disk space, after sorting that out and all is good now, thanks.

1 Like