Modify the mysql Node properties via dashboard

Hello together,

is it possible to modify the properties of the mysql Node via text input (or something else) from the dashboard.

image

Or does anyone know if it is possible to configure the properties of a Node via dashboard?

Thanks in advance.

Kind regards,
Rum1

If you look at the 'Help' tab for the node it says this:

mysql

Allows basic access to a MySQL database.

This node uses the query operation against the configured database. This does allow both INSERTS and DELETES. By its very nature it allows SQL injection... so be careful out there...

msg.topic must hold the query for the database, and the result is returned in msg.payload .

msg.payload can contain an array of values to bind to the topic.

Typically the returned payload will be an array of the result rows. Note : these are of type RowDataPacket , and not a completely standard object.

If nothing is found for the key then null is returned,

The reconnect timeout in milliseconds can be changed by adding a line in settings.js

Since it doesn't say you can dynamically change them, then you can't.

Thank you for the fast reply!
I saw this but I was not sure if there is maybe another way to do it.

But now I know there is no other way, thank you. :slight_smile:

You have a few options...

  1. Fork the node and add that functionality (or hire someone to do it)
    1. If it works well, you might consider a PR back to the main repo
  2. Use env variables instead of hard coded values in the config node
  3. see here for info
  4. add multiple nodes and configs - each set for a different database & route messages from dashboard appropriately

NOTE: environment variables are only read when node-red starts. To set them via dashboard you would need some way of setting the OS env variables (where node-red runs) and restarting node-red - not simple but possible.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.