You have response on SO, that seems to be selinux. Why you don’t configure selinux properly? It’s doesn’t look like a Grafana issue, but your infra limitations.
Yes, it is it puts SELinux into permissive mode - according to the documentation - I also had to do that to troubleshoot other things, where SELinux was indeed the issue.
The login credentials to the MariaDB are in the Grafana data sources, and those work when connecting via CLI oder other DB tools.
It also worked in Grafana up until yesterday and I have no idea where to look.
This is a Fedora installation, and the problem is with SElinux:
datasource configuration
[root@fedora ~]# getsebool -a | grep grafana
grafana_can_reverse_proxy → off
grafana_can_tcp_connect_elasticsearch_port → off grafana_can_tcp_connect_mysql_port → off
grafana_can_tcp_connect_postgresql_port → off
grafana_can_tcp_connect_prometheus_port → off
The highlighted boolean must be changed, at least. Use the -P flag to set it permanently:
I had also followed another technote to clear access from the http process, as well as myusql (though I was able to connect to mysql/mariadb from a terminal session, so that might not have been necessary):
No reboot required. Refreshed the database connection page in Grafana, and green light!
use mysql/mariadb for grafana config
If you wish the Grafana configuration itself be stored in a localhost mysql/mariadb database, you will need to allow mysql access on all ports (actually, this might take the place of the mysql_connect setting, above – for you to test)