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)
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.
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.