node-red-contrib-stackhero-mysql is a Node-RED contribution that provides a robust node for interacting with MySQL and MariaDB databases. Currently at version 1.0.6, this package maintains a stable release cadence, focusing on reliability and compatibility. Its primary differentiator is native support for TLS (SSL) encryption for secure connections, along with compatibility for the "Caching SHA2 password" authentication method, which is crucial for modern MySQL 8.x environments. This addresses a common pain point for users connecting to newer MySQL instances. The node simplifies database operations within Node-RED flows by allowing SQL queries in `msg.topic` and parameterized arguments in `msg.payload`, supporting various parameter styles including object-based, named, positional, and bulk insertions. It integrates seamlessly into Node-RED, extending its capabilities for data persistence and retrieval without requiring custom code for connection handling or authentication specifics.
npm install node-red-contrib-stackhero-mysqlNo compatibility data collected yet for this library.
Demonstrates preparing `msg.topic` and `msg.payload` within a Node-RED function node for database interaction, showcasing various parameter passing methods.
Use parameterized queries. Place placeholders (like `?`, `:name`, `SET ?`, or `VALUES ?`) in `msg.topic` and provide the corresponding values in `msg.payload`.
Ensure that the 'Use TLS (SSL) encryption' option is enabled in the Node-RED node's configuration for your database connection.
Ensure you are using `node-red-contrib-stackhero-mysql` as it explicitly supports 'Caching SHA2 password' authentication. Verify your database user is configured with the correct authentication plugin if issues persist.
In the Node-RED node's configuration, navigate to the database connection settings and check the 'Use TLS (SSL) encryption' box.
Confirm you are using the `node-red-contrib-stackhero-mysql` package, as it specifically includes support for 'Caching SHA2 password'. If the error persists, ensure your database user's authentication plugin is set correctly on the server.