Move from rpm based grafana 8.4.6 with auth.generic_oauth to docker based grafana failed

  • What Grafana version and what operating system are you using?
    8.4.6
  • What are you trying to achieve?
    move from rpm based grafana 8.4.6 to docker based grafana 8.5.27(because we use elasticsearch 6.0) and 11.1.0( try use opensearch)
  • How are you trying to achieve it?
    we use auth.generic_oauth;i copy /etc/grafana and /var/lib/grafana to docker and start the docker
  • What happened?
    i got grafana user already exists and Login failed User sync failed error

I use grafana.abc. net for grafana 8.4.6, and grafana.abc. com for grafana 8.5.27 and grafana.test.abc. net for grafana 11.1.0.


maybe i need to delete all from user table?

Not all, delete only oauth users (and make sure you have backups).

delete from user where name=“user”;
delete from user_auth where user_id=id;
i use these two command to resolve the problem, thank you.

So you “fixed” that only for one particular user. Other oauth users may have the same problem.

yes, after i checked this is work, i will fix all users.

but i got one problem, the role change from admin to viewer

Yeah, it’s a brand new user, so configure role in the same way as you did it for previous user. Only you know how you manage roles.