Hello everyone, I’m currently using n8n’s default SQLite database. As my workflows and data have grown, the database file has become quite large (currently around XX MB), causing:
-
Slow startup times
-
Large backup files
-
Concerns about single-file database stability
Current Environment
-
n8n version: 1.102.4
-
Operating system: Linux
-
Database: SQLite (default)
-
Data volume: Approximately 15 workflow records, 3 execution records
Migration Requirements
I want to replace SQLite with MySQL or another more stable database, hoping to:
-
Preserve existing workflows and data without loss
-
Improve database performance
-
Facilitate future maintenance and backup
Issues Encountered
During the migration attempt, I encountered the following difficulties:
-
JSON field format issues when exporting data from SQLite
-
MySQL field type mismatches
-
Abnormal workflow status after migration (old workflows still running but not visible in the backend)
Specific Error Messages
text
Apply to mysql_workfl…
Error 1: JSON parsing errors
Error 2: Field type mismatches
Error 3: Workflow activation shows duplicate warnings
Attempted Solutions
-
Using sqlite3 to export .sql files and directly import to MySQL

-
Using Python scripts to convert data

-
Manually modifying table structures

Help Needed
-
Recommended Migration Solution: Are there any mature n8n database migration tools or scripts?
-
Database Choice: MySQL vs PostgreSQL, which is more suitable for n8n?
-
Migration Steps: Detailed migration operation guide
-
Problem Resolution: How to handle JSON fields and field type conversion?
-
Post-Migration Configuration: How to correctly configure n8n to connect to the new database?
Environment Information
-
Database management experience: Yes/No
-
Server management permissions: Yes/No
-
Can restart n8n service: Yes/No
Expected Results
I hope to get a complete, verified migration solution to ensure data security and system stability.
Thank you for your help!
