Reputation: 377
I'm trying to connect Grafana with MySQL.
I pulled grafana to docker and ran it. MySQL is not in container.
I created user with all privileges, created database and table. Set from 127.0.0.1 to 0.0.0.0.
When i trying to connect to MySQL in Grafana, it show
query failed - please inspect Grafana server log for details
I don't know what to do, could someone help?
Thanks a lot!
EDIT: When I spam "save&test", it showed
Datasource has already been updated by someone else. Please reload and try again
Upvotes: 1
Views: 4451
Reputation: 377
So after all it work this. https://grafana.com/docs/grafana/latest/datasources/mysql/
U need to create user with permissions only for select.
CREATE USER 'grafanaReader' IDENTIFIED BY 'password';
GRANT SELECT ON mydatabase.mytable TO 'grafanaReader';
Upvotes: 2