How to connect MySql with Grafana

How can I solve this error when trying to connect my database to grafana and what should I take into account to be able to connect it and show me the data and metrics?

It shows me this error when trying to connect it:

(db query error: query failed - please inspect Grafana server log for details)

THANK YOU!!

So, did you inspect the Grafana server log for details?

What do you find there for the time when you were doing this?

Antony.

Hi @steveqo,

Welcome to the :grafana: community support forums !!

Maybe you are facing the same issue as posted here by another user who wants to setup MySQL Datasource in Grafana.

Please check the suggestions and see if that helps you out. Incase not, then please post some more details e.g. screenshot of the error message and the logs.

Thanks

no, I haven’t inspected the Grafana server log yet, because I don’t know where to find it.

Welcome

Whatever user name you have configured on mysql should have this configured. In the below case I use % so that any host can connect but you might want to limit it to the ip address of grafana.

/var/log/grafana/grafana.log

Antony.