# Flow to insert into MySQL table

**URL:** <https://discourse.nodered.org/t/flow-to-insert-into-mysql-table/31712>\
**Category:** General\
**Created:** [19 August 2020 02:34 UTC](https://discourse.nodered.org/t/flow-to-insert-into-mysql-table/31712 "2020-08-19T02:34:30Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 August 2020 09:48 UTC](https://discourse.nodered.org/t/flow-to-insert-into-mysql-table/31712/2 "2020-08-19T09:48:29Z")

</div>

Tim,  
First off when you are inserting a flow in a thread it needs to be formated correctly or it will not be importable by others. Please read [How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506) then edit your post and fix it. (click the pencil icon under your post )

Secondwhat have you tried so far?

- have you defined the MySQL database and table?
- which node are you using to talk to MySQL?

I would also suggest you create a new flow with a `insert` that contains your query, the mysql node you are using and a `debug` node (set to display the complete msg object) so you can see the results. You might want to add a `catch` node connected to another `debug` node (set to display the complete msg object) to catch any errors.

---

_[View the full topic](https://discourse.nodered.org/t/flow-to-insert-into-mysql-table/31712)._
