n8n icon indicating copy to clipboard operation
n8n copied to clipboard

Migration error - Mariadb, Unknown collation: 'utf8mb4_0900_ai_ci, Duplicate column name 'tmp_id

Open sicaboy opened this issue 10 months ago • 1 comments

Bug Description

Starting migration UpdateRunningExecutionStatus1677236788851
Finished migration UpdateRunningExecutionStatus1677236788851
Starting migration CreateVariables1677501636753
Finished migration CreateVariables1677501636753
Starting migration CreateExecutionMetadataTable1679416281779
Finished migration CreateExecutionMetadataTable1679416281779
Starting migration AddUserActivatedProperty1681134145996
Finished migration AddUserActivatedProperty1681134145996
Starting migration RemoveSkipOwnerSetup1681134145997
Finished migration RemoveSkipOwnerSetup1681134145997
Starting migration MigrateIntegerKeysToString1690000000001
Migration "MigrateIntegerKeysToString1690000000001" failed, error: Unknown collation: 'utf8mb4_0900_ai_ci'
There was an error running database migrations
Unknown collation: 'utf8mb4_0900_ai_ci'
Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true (recommended), or turn this check off set N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=false.
User settings loaded from: /home/node/.n8n/config
Last session crashed
Initializing n8n process
n8n ready on ::, port 5678
Migrations in progress, please do NOT stop the process.
Starting migration MigrateIntegerKeysToString1690000000001
Migration "MigrateIntegerKeysToString1690000000001" failed, error: Duplicate column name 'tmp_id'
There was an error running database migrations
Duplicate column name 'tmp_id'

Docker image version: docker.n8n.io/n8nio/n8n Mariadb image version: mariadb:10.6

To Reproduce

Create a new instance, configured as mysqldb, connecting to a mariadb

Expected behavior

It should be started normally

Operating System

Docker

n8n Version

docker.n8n.io/n8nio/n8n

Node.js Version

Database

MariaDB

Execution mode

main (default)

sicaboy avatar Jun 15 '25 23:06 sicaboy

Hey @sicaboy,

We have created an internal ticket to look into this which we will be tracking as "GHC-2563"

Joffcom avatar Jun 15 '25 23:06 Joffcom

Hey @sicaboy,

Does your database support utf8mb4_0900_ai_ci? It might be that you need to upgrade MariaDB or better still export all of your workflows and credentials and move to Postgres as MySQL / MariaDB support will be removed in the future which is why the documentation around it has been removed from the site.

Joffcom avatar Jun 16 '25 08:06 Joffcom

Closing this ticket, I switched to other dbms.

sicaboy avatar Jun 16 '25 08:06 sicaboy