[SOLVED] Error setting up InfluxDB+Grafana

Looks like somehow there is an openhab_db database that already existed (from previous setup?) before you created the initial admin user.
I suggest to delete the data directory and recreate everything:

  1. stop the InfluxDB daemon with sudo systemctl stop influxdb
  2. delete the data directory and subdirectories (specified in influxdb.conf)
  3. start the daemon
  4. start the InfluxDB CLI
  5. create the admin user
  6. create the openHAB database
  7. create the openHAB user
  8. grant the openHAB user all privileges on the openHAB database
  9. create the Grafana user
  10. grant the Grafana user read privileges on the openHAB database
  11. don’t forget to match the user/password/database in influxdb.cfg

Indeed, these entries are just records of a write action. But given the strange behaviour shown on the commandline, I suggest the start clean.

2 Likes