N8N Crashed in MySQL migration after update to 0.234.1

Describe the problem/error/question

This issue occurred in version 0.234.1 (using the latest tag from the docker image). The migration succeeds but then the system starts to crash and shuts down. I read in one of the community threads that one of the fixes implemented in this version was precisely a MySQL database migration problem identified in version 0.234.0 available here but I’m still having trouble with it. I tried creating a new database from scratch and performing the migration to test but I had the same problem. If I remove the MySQL database configuration data it works normally

I’m new to this tool, so if I’m doing something wrong, please let me know.

What is the error message (if any)?

2023-07-10 08:21:44 License manager not initialized
2023-07-10 08:21:44 UserSettings were generated and saved to: /home/node/.n8n/config
2023-07-10 08:21:45 n8n ready on 0.0.0.0, port 5678
2023-07-10 08:21:45 Migrations in progress, please do NOT stop the process.

Please share your workflow

version: “3”

services:
n8n:
image: docker.n8n.io/n8nio/n8n
ports:
- “5678:5678”
environment:
- WEBHOOK_URL=url
- WEBHOOK_TUNNEL_URL=url
- TZ=tz
- GENERIC_TIMEZONE=tz
- N8N_ENCRYPTION_KEY=key
- N8N_SMTP_USER=user
- [email protected]
- N8N_SMTP_PASS=password
- N8N_SMTP_HOST=sub.host.tld
- N8N_SMTP_PORT=587
- DB_TYPE=mysqldb
- DB_MYSQLDB_HOST=host
- DB_MYSQLDB_PORT=3306
- DB_MYSQLDB_USER=user
- DB_MYSQLDB_PASSWORD=password
- DB_MYSQLDB_DATABASE=n8n

Share the output returned by the last node

2023-07-10 08:21:44 License manager not initialized
2023-07-10 08:21:44 UserSettings were generated and saved to: /home/node/.n8n/config
2023-07-10 08:21:45 n8n ready on 0.0.0.0, port 5678
2023-07-10 08:21:45 Migrations in progress, please do NOT stop the process.

Information on your n8n setup

  • n8n version: 0.234.1
  • Database (default: SQLite): MySQL
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Windows 11 & Amazon Linux 2
2 Likes

I’m having the same problem, can someone please give us a resolution?

Hey @josh662 & @ALYSSON_BARROS,

Can you both confirm the version of MySQL you are running and set the env options below and start up n8n and send over the console output.

DEBUG=*
DB_LOGGING_ENABLED=true
DB_LOGGING_OPTIONS=all

Hi!
I’m using the Aurora (MySQL 5.7) 2.11.2,
and this was the output of the logs you asked for:

Hey @josh662,

That looks like the migration might have been stopped the first time and wasn’t able to roll back correctly. If you have a database it would be worth restoring from the backup. You did mentioned that you made a new database as well, Was this from the new database being loaded on 0.234.1 to start?

The new database I made was on that same Aurora MySQL, but completely from scratch, without adding data recovery from the other database. I did this to test if the n8n was able to create normally, and it ended up giving the same problem. I use the 0.234.1 version.

@josh662 is that log output from the new database?

The log I send earlier is from a copy of the database we would like to use, here’s the log when it’s applied to a new database (I just did everything from scratch again for testing)

Perfect thanks, So the first one you will need to roll back to an earlier version that does work, export your workflows and credentials and import them into a new database.

With the new database not working I will need to let the team know internally so we can get that sorted, It could be worth taking this time to use Postgres instead though as we will be fully dropping MySQL support in the future.

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