I was using the node-red-contrib-stackhero-mysql as I wanted secure SSL connection to a mariadb 10.x. The first issue was that on Debian/Ubuntu a custom SSL library is used for Mariadb and not the openssl library and it did not work as there was a cipher issue (you may compile mariadb with openssl to be used but I just switched to another Linux ). I installed mariadb 10.x on centos7 but not now I saw a new issue after solving the first because I was using a not public CA signed certificate and using the solution for HTTP communication like " NODE_TLS_REJECT_UNAUTHORIZED=0 " did not help at all. Finally looking at mysql - npm and the "SSL options" I got the idea to add to the main.js file under """<home/user or root>node-red/node_modules/node-red-contrib-stackhero-mysql/src"" this code " ssl: {rejectUnauthorized: false}, " (I insatalled node-red during being a root user so this is why it was under root not home/<user_dir>).
// Note: the connection is not done here
this.pool = mysql.createPool({
host: config.host,
port: config.port,
user: this.credentials.user,
password: this.credentials.password,
database: config.database,
waitForConnections: true,
connectionLimit: 5,
queueLimit: 0,
connectTimeout: 1000,
ssl: config.tls ? {} : false,
ssl: {rejectUnauthorized: false},