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:

1 Like

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

Where i can find Grafana.db file in mac system

/opt/homebrew/Cellar/grafana/10.3.1/share/grafana/data

** 10.3.1 is the version, check yours first

on my new Mac with Apple chip, with grafana installed using brew

I’ve created this issue with Grafana on GitHub regarding the issues changing the admin password with a Homebrew installation. Were you able to solve it?

Thanks!!! --config /etc/grafana/grafana.ini option worked for me, because regular ‘grafana cli admin reset-admin-password’ was updating password in sqlite instead of postgres

2 Likes

delete de sqlite db, and docker compose up -d.