MySQL is not inserting, it is updating

Describe the problem/error/question

I’m trying to add a record to my database table and it only updates the id 1

And my database has the id as the primary key

Does anyone know why this happens? Or is there another way to fix it? I created a new flow just with node mysql and managed to insert it, but in my flow it doesn’t work

What is the error message (if any)?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.45.1
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: Debian 12

Try your query directly in phpMyAdmin first. Does it work then?

Hey @jochem, I recorded a video showing how it is.

I tried to run it through the workflow and it didn’t work, I created a new workflow and it worked and I also added it through phpmyadmin and it also worked, it’s precisely in the workflow with that specific node that this is happening, I also tried deleting and deleting the workflow, I also tried copying the node from another workflow and it didn’t work at all.

If the query works correctly in phpMyAdmin, I currently don’t know what else you can try. Hopefully, someone else can help.

@jochem thank you very much for trying to help me, I’ll see if any @moderators or @admins can help

@htnrodrigues Can you post the schema of the table?

Type SHOW CREATE TABLE <TABLE_NAME> and post the output of the DDL.

Hey @Mulen, the table is created like this

Can you paste the CREATE TABLE statement as text here?

Hey @Mulen, here’s the statement

https://pastebin.com/Mx6i2H1Z

I can insert just fine with the MySQL node.

What’s the actual problem? Maybe something in your workflow is wrong.

I do have exactly the opposite problem. I can insert new data but I can’t update the data within mysql table through the update node.