Admin password reset

the error i got ‘Invalid username or password’

The correct way to reset the admin password is through the use of grafana-cli as many posters here are suggesting. This thread includes mentions of the --homepath argument to override the home path value. If you use the --homepath flag, as a global option it needs to come first. A full correct example is as follows:

grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new password>

Note that the --homepath argument is only needed if you are not in the installation directory.

Documentation can be found here:

I have tried to use grafana cli reset password command but it doesn’t work.

I have found out alternate method to reset grafana password in local.

  1. Search for grafana.db file in system
  2. run this command on your terminal
    sqlite3 grafana.db
  3. sqlite command prompt will open run below query
    delete from user where login='admin'
    Thats’s it restart your grafana it will ask you to reset your password.
2 Likes