OneDrive excel import into Mysql Database

Hey Mate. New to N8N, Having a bit of trouble with connecting to mysql db. Can seem to get the connection correct. Can you assist? I seem to be stuck on inserting records into the db. getting errors. Not sure what i am doing incorrectly. Or is there a better way…

Error:

Problem in node ‘MySQL - quikvps‘

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘-ORDER_LINK, YEARBOOK_LINK, DOWNLOAD_LINK, PICTURE_DATE, SEASON_TYPE, EVENT_T…’ at line 1

Not getting any output for the mysql Node.

Information on your n8n setup

  • n8n version: Latest
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]: own
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker, Self Hosted

I’ve always got this error when I misspelled some column or used reserved keywords, please check all column names if they match the column names of your table.

@FelixL , thank you for responding. All is good. am I missing a comma?

This is because you have a hyphen (-) in your column name, and n8n isn’t handling it properly.

We’ll fix this, but in the mean time you can work around it in the following way:

  1. When preparing your data to pass into the MySQL node, add backticks to the field name that contains a hyphen
  2. Also add those backticks to the field name in the MySQL node

Here’s a workflow to give you a more specific idea of what I mean:

1 Like

@sirdavidoff, Cheers mate. That was it! I would not have caught that.

Don’t blame you! We have plans to completely overhaul the MySQL node soon, so it should become much easier to use.

@sirdavidoff thanks for the info, learned something new today :slightly_smiling_face:

Are there plans to show the used SQL command in the error message?

1 Like

That’s a great idea. I’ll add it to the list

1 Like

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