I have MariaDB running on a Raspberry Pi (192.168.1.11) and I can access it from Node-red on that Pi, using node-red-node-mysql.
In /etc/mysql/mariadb.conf.d/50-server.cnf I have bind-address = 0.0.0.0
netstat -ant | grep 3306 confirms that MariaDB is listening to all IP addresses
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
When I try to access the db from Node-red on another Pi (192.168.1.26) I get the error
Error: Host '192.168.1.26' is not allowed to connect to this MariaDB server.
Any suggestions what else I can do to enable access?
node-red on 192.168.1.26 is 2.2.2, on 192.168.1.11 2.2.0
node-red-node-mysql 1.0.0
mariadb version: 10.3.31-MariaDB-0+deb10u1 Raspbian 10
You need to look at the mariadb docs for granting permission to users. Databases normally grant access based on a username, password and the IP of the connecting client.
It sounds like you have only granted access to the user if they are on the same host as the db