This is a tool to boost any user up to Grafana server admin. Created because I am a dumbass and removed the admin user by mistake. If anybody else find it useful, enjoy!
Use this at your own risk. I am not responsible if you mangage to break your Grafana install with this. Make sure you have a backup of your grafana database before you run it.
Usage is pretty simple
- Stop your grafana instance
- Locate the sqlite config database (It usually lives at
/var/lib/grafana/grafana.db
) - Make a backup of that database
- Run the tool as below
$ grafana-adminizer --database grafana.db --user username
Options are as follows
Grafana Adminizer
For when you have lost your server admin account
-database database
The grafana database to update (default "/var/lib/grafana/grafana.db")
-help
Prints this message
-user login
The login of the user you wish to promote (default "admin")