Starting from the machien running Grafana, what result do you get from:
telnet IP 3306
where IP is the address of your MariaDB server (and the same address as you’re
entering into Grafana)?
If that works, you should get a response from the MariaDB server something
Connected to herbert.example.com.
Escape character is ‘^]’.
If it does not work, then you have a network connectivity problem between the
Grafana server and the MariaDB server.
If it does work, go to the MariaDB server and use the command line client to
find out what permissions you have for the user you are telling Grafana to log
mysql mysql -e “select * from user where User=‘GrafanaUsername’”