Hello,
I am working to make the connection with MySQL installed on my PC to the Grafana Cloud.
Since I tried most solutions I could find, I still get the error ‘db query error: failed to connect to server - please inspect grafana server log for detail’.
and in server log ‘lvl=eror msg=“query error” logger=tsdb.mysql err="Error 1044: Access denied for user ‘gr’@’%’ to database ‘el_db’"’
I set the firewall rule (outbound) to let the port (3306) a usable for external access.
I set the privileges on the user with ‘select’ only as Grafana document says.
I can successfully access to the MySQL database with Host:‘IP:port number’ in local grafana.
But when I try to connect MySQL database from Grafana cloud with exact same setting that I used for the local grafana, it gives an error.
Can someone give me a clue what is wrong with the setup?
Thanks
Hey there! From the details you shared it sounds like the connection is being established between Grafana Cloud and your MySQL database but there might be an issue with the permissions for the “gr” user. I recommend double checking the permissions for “gr” user on the “el_db” database. Access Control and Account Management
Hello,
Thanks for the reply.
I already solved this but left this thread be opened since I can’t delete it.
Anyway, your suggestion is right (permission issue) but the main source of the problem was not on the MySQL but on the router firewall.
I solved the issue by forwarding the port number to pass the router’s firewall since I only managed the client-side firewall thereby could access local Grafana with IP address.
Are you trying to use your Grafana Cloud to connect to a local database? If yes, then you would need to specify your public IP address that can be accessed by Grafana Cloud and typically have the port 3306 in your firewall open.