Grafana with MySQL

Hi everyone,

I’m new on grafana and I’m trying to make it work on windows 10 with MySQL as data source (8.0.12).

When I save the data source, it put me a green message on the top right "data source updated " but I have a red message on the bottom “this authentification plugin is not supported”. On the plugin tab there is no plugin to download for MySQL. I have the same red message on the dashboard tab.

I configured my mysql server on the port 3306 and saved the data source on the same port.

Someone can figure out wath is wrong pls?

Sorry for asking that kind of question, it’s certainly something easy but I cannot see what’s the problem.
I see that we need to configure the database on custom.ini.

#################################### Database ####################################
[database]

You can configure the database connection by specifying type, host, name, user and password

as separate properties or as on string using the url properties.

Either “mysql”, “postgres” or “sqlite3”, it’s your choice

type = mysql
host = localhost:3306
name = grafana (I have a db on my mysql server named grafana)
user = jojo (which a user a created with mysql)

If the password contains # or ; you have to wrap it with triple quotes. Ex “”"#password;"""

password =******* (the password of my user)

When I try to connect to the grafana server with this configuration it put me the error :

e[31mERORe[0m[09-21|14:12:07] Server shutdown e[31mloggere[0m=server e[31mreasone[0m="Service init failed: Migration failed err: this authentication plugin is not supported"

I really need help on this topic please if you understand what’s wrong here please feel free to help the grafana noob I am :sob::sob:

Hi,
I seem to remember that version 8 of mysql includes a change in the handling of some permissions, which does not allow compatibility with grafana. I may be wrong.

Best.

This could be the issue. New versions of MySQL use 3 differents plugins for user’s authentication :

  • auth_socket
  • mysql_native_password
  • sha256_password

I think only “mysql_native_password” can be handled by Grafana.

You have to check what authentication plugin is used by user “menagerie”.

You can check this using PhpMyAdmin.

In PhpMyAdmin (mine is in french so I’m not sure about my translation…):

  • Go to “Users account”
  • Click on “Change privileges” for the user “menagerie”
  • Click on “Connexion informations”
  • Check “Authentication plugin”, it must be “MySQL native authentication” to work with Grafana.

Regards

1 Like

Hi everyone,

thanks a lot for your support ! I saw first danielgonzalez message and I unistall mysql 8 and install mysql 5 and it works !

I will try during the week what zigobs said and I will give you a feetback here.

Thanks you all !!

Best regards