Switch from default sqlite db to mariadb


I tried to switch my current install from the default sqlite db to mariadb but it fail to start with this error :
UnhandledPromiseRejectionWarning: Error: There was an error: Unexpected end of JSON input
at Object.error (/usr/local/lib/node_modules/n8n/node_modules/@oclif/errors/lib/index.js:22:17)

What I did is :

  • Stop container
  • Create a DB in mariadb with the default structure (got it from another deployment)
  • Import my flows and credentials
  • Configure container to use my DB
  • Start container

Is there something I’m missing ?
Note: encryption key did not changed, I revert back to using sqlite DB and it works fine again

I wonder what JSON file it is complaining about. Do you make changes to any JSON file?

Hi Jan,

Nope, I only switched the DB.
I already add the same issue 1 time when I forgot to restore the config file with the encryption key on a new container so I think it has something to do with it.
Could it be an error while decoding “data” column in credentials ?

Do you have active workflows and that error happens when they get loaded on startup? If you deactivate the workflows (in this case probably manually via the database) does the error disappear?