Some useful changes to the mysql node

Hi all,

I wasn't sure where to put this, hope it's fine here:

I faced the situation where I needed a SSL CA certificate to connect to my database.
I modified the mysql node so that a path to a CA certificate can be entered.
For debugging SQL queries I was always annoyed that it is not possible to see the query after after the bind.
I just have two questions:
The binded query is send to the side panel via node.warn(query), though it is not a warning. Is there a good way to send stuff as a normal debug message to the side panel?
I never contributed to Node-Red before (even opensource...) is this a good place to discuss this?


Hi - sure - good place to start.

Second thought first... - nodes can only send warnings or errors to the sidebar. node.log will just go to the console log. But if you are sending every query then I don't think it should be in the sidebar. (unless you have added a specific debug switch ? (which would be unusual also... :slight_smile:

Some questions re the cert handling - I see you read the file on every connection attempt - would it not be better to read it once when the node is initialised and use that - that would also allow more error handling in case the file is missing etc ?

Just a thought, but would using the tls-config config node be an option? It is already provided by the core.

Here's my previous post about that: