Script to drop all n8n tables


Describe the issue/error/question

We’re trying to install n8n on a MySQL that we already use for other stuff, we did the initial installation but now we want to have a prefix for the tables and we need to delete all the related tables and configuration from n8n, is there a way to do it?

Is there a way to do the migration manually?

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
    Latest version

  • Database you’re using (default: SQLite):


  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm,, desktop app]:

Docker with kubernetes

Hey @Daniel_F_Jaramillo, I am not aware of any script that’d do the job unfortunately. From quickly spinning up fresh images of n8n & MySQL, these would be the tables n8n creates:


Hope this list helps!

Thank you!