n8n - 💡(How to fix) Fix bug: All database credentials fail after v2.20.12 (works fine when downgraded to 2.20.12)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Bug Description

Brief description of the problem

Database node credentials fail on all versions after 2.20.12. Reverting/downgrading back to 2.20.12 completely resolves the issue and everything works normally again.

n8n Setup

  • n8n version: 2.21.5
  • Database system: MongoDB, MySQL, MS-SQL, PostgreSQL
  • n8n Deployment mode: Docker (Standard Image)
  • Operating System: macOS 26.5 / Windows 11

To Reproduce

Steps to reproduce

  1. Spin up an n8n instance via Docker using any image version higher than 2.20.12 (e.g., 1.x.x or later).
  2. Ensure you have a database instance (MongoDB, MySQL, PostgreSQL, or MS-SQL) running locally on the host machine.
  3. In n8n, create a new credential for that database node, setting the host to host.docker.internal (or the corresponding host gateway IP) to connect back to the local database.
  4. Attempt to save the credential or test the connection -> Observation: The connection/credential check fails.
  5. Stop the container and pull/run the exact same setup using the n8nio/n8n:2.20.12 image.
  6. Test the connection with the same credentials -> Observation: It connects successfully and everything works perfectly.

Expected behavior

Database nodes should successfully authenticate and connect using the saved credentials, just as they do in version 2.20.12.

Debug Info

  1. Deploy n8n via Docker using any version after 2.20.12.
  2. Set up a database node (MongoDB, MySQL, MS-SQL, or PostgreSQL) connecting to a instance hosted on localhost / host.docker.internal.
  3. Attempt to save the credentials or test the connection.
  4. The connection/credential check fails.
  5. Downgrade the Docker image back to 2.20.12, and the exact same credentials work perfectly.

Operating System

macOS 26.5 / Windows 11

n8n Version

2.21.5

Node.js Version

24.15.0

Database

SQLite (default)

Execution mode

main (default)

Hosting

self hosted

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Database nodes should successfully authenticate and connect using the saved credentials, just as they do in version 2.20.12.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

n8n - 💡(How to fix) Fix bug: All database credentials fail after v2.20.12 (works fine when downgraded to 2.20.12)