You need to create a mysql user account with appropriate access to the ‘asteriskcdrdb database’ from the address or name of the client trying to so access.
Unless Grafana is running locally on the machine, using the FreePBX databases as a data source will also require updates to mysql as it listens on localhost by default. You would need to update mysql to listen on an ip for access.
Actually ‘mysql servers’ use the internal mysql.users table to define the AccessControlList in a more granular fashion
mysql -u root mysql -e 'select user,host,password from user'
Although you are likely using mariadb and not mysql as your server, a definitive description of how to allow ‘users’ from ‘hosts’ with ‘privileges’ of <as defined> to the ‘tables’ in ‘databases’ is
We’re talking about two different things. What you mentioned has to be done no matter what, a proper user needs access for Grafana. What I was referring to was if Grafana wasn’t running locally on the PBX then mysql/maria conf file needs to be updated to listen on an IP that can be accessed by Grafana.
Uhm, depending on your distro it could be /etc/my.cnf or /etc/mysql/mysql.conf.d/mysqld.cnf. It’s the standard mysql/mariadb server configuration file. You would edit bind-address = 127.0.0.1 to something that isn’t localhost and allows remote access.