By switch from sqlite3 to postgres, Grafana fallback to sqlite

Hello community,

I try to switch my fresh new vanilla Grafana (on Debian11) installation from sqlite3 to Postgresql.

What I did:

  • Stop Grafana Service
  • Edit grafana.ini to use Postgresql, like described in manual, kill everything sqlite DB stuff in connection part.
  • Delete .db sqlite3-file
  • Restart Grafana Service

What happened: Grafana creates a new sqlite3 DB (said in so in logfile). Postgres entries are totaly ignored.

What I am doing wrong? Ping to Postgresql server worked by IP and DNS. Adding a Postgresql database as Datasource (same server / diffrent database and user) works without any issues. Username and Pass sure for 99,9% no typo issues.

As someone an idea? Missed i something very basic before editing grafana.ini?

You didn’t provide reproducible example :man_shrugging:, so only a guess:

  • you edited wrong grafana.ini file
  • you edited wrong section in right grafana.ini
  • you have some typo in your config key in right grafana.ini, so it is unknown config option

At the end your Potgress config is not applied/recognized, so Grafana uses default Sqlite DB.