MySQL Credential to Mariadb

Describe the problem/error/question

I’m currently trying to connect some MySQL nodes for my workflow and I wanted to add some credential for my database.

For a database mariadb 10.4 all good connection is working fine.

But for 10.6 or higher I cant make it work. I always get a connexion timeout.
I saw that the authentification method changed the default to caching_sha2_password where in 10.4 it was mysql_native_password.
Maybe the MySQL driver used is do not handle this, is there a way to update it or a way to get around the problem ?

What is the error message (if any)?

Couldn’t connect with these settings
connect ETIMEDOUT

Information on your n8n setup

  • n8n version: latest
  • Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • Operating system: ubuntu
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own, main

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Anyone got same issue ?

To connect to MariaDB 10.6+ using n8n’s MySQL nodes:

  1. Modify your MariaDB server configuration:
[mysqld]
default_authentication_plugin=mysql_native_password

Restart MariaDB after changing this.
2. For existing users, update their authentication method:

ALTER USER 'your_username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'your_password';
FLUSH PRIVILEGES;
  1. In n8n MySQL credential, try adding these parameters to the connection string:
?allowPublicKeyRetrieval=true&authPlugin=mysql_native_password
  1. If possible, update n8n to the latest version, as newer versions might have improved MariaDB compatibility.

If my solution helped resolve your issue, please consider marking it as the answer! A like would make my day if you found it helpful! :blush::wrench:

  1. Have you tried explicitly setting the authentication method in your connection string?
  2. Are you able to connect to the MariaDB 10.6+ server using other MySQL clients?

For more details on MariaDB authentication plugins, refer to the official MariaDB documentation.

  1. How do you change the connection string via the credential page on n8n ?
  2. Yes I connect with a phpmyadmin or dbeaver

I dont have access to the configuration of my database unfortunately.

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