# Some useful changes to the mysql node

**URL:** <https://discourse.nodered.org/t/some-useful-changes-to-the-mysql-node/20884>\
**Category:** Share Your Nodes\
**Created:** [26 January 2020 21:16 UTC](https://discourse.nodered.org/t/some-useful-changes-to-the-mysql-node/20884 "2020-01-26T21:16:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![techtimo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/techtimo/32/14283_2.png) [@techtimo](https://discourse.nodered.org/u/techtimo)\
**Post date:** [26 January 2020 21:16 UTC](https://discourse.nodered.org/t/some-useful-changes-to-the-mysql-node/20884/1 "2020-01-26T21:16:02Z")

</div>

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.  
[https://github.com/techtimo/node-red-nodes](https://github.com/techtimo/node-red-nodes/tree/master/storage/mysql)  
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?

Cheers

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [26 January 2020 22:35 UTC](https://discourse.nodered.org/t/some-useful-changes-to-the-mysql-node/20884/2 "2020-01-26T22:35:25Z")

</div>

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... 🙂

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 ?

---

<div class="post-metadata">

**Author:** ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)\
**Post date:** [27 January 2020 05:55 UTC](https://discourse.nodered.org/t/some-useful-changes-to-the-mysql-node/20884/3 "2020-01-27T05:55:45Z")

</div>

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:

> [@\[Announce\] node-red-contrib-homie-convention](https://discourse.nodered.org/t/announce-node-red-contrib-homie-convention/16329/7):
>
> The TLS config node is provided by the core as tls-config, so you can use it like any other config node. So I think all you need to do is just add an optional node property, like tls: {type:"tls-config",required: false} The core MQTT node is a good example.
