Grafana "Invalid username or password" on localhost

Viewed 1423

Runnning Grafana on https://localhost:3000, my password seems to have stopped working.

  • I tried resetting the admin password with grafana-cli --homepath /usr/local/share/grafana admin reset-admin-password admin and
  • reinstalling Grafana,

but keep getting "Invalid username or password".

1 Answers

On macOS, this solved the issue for me:

$ find / -type f -name grafana.db

With the file found above

$ sudo sqlite3 /usr/local/var/lib/grafana/grafana.db

Finally

sqlite> update user set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';
sqlite> .exit

This will set the username/password to admin/admin.

Related