Connection refused to my mysql local server

Hey, I’m trying to connect to my mysql local server, but an error is occurred.
Here are my credentials (I’m assuming that all inputs are right).

The connection is refused. The error is
connect ECONNREFUSED 127.0.0.1:3306

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:

n8n version: 1.49.0
Database: mySql
Running n8n via: n8n cloud
Operating system: Windows

Hi @Cristian_Pele,

Welcome to the community! :tada:

By default MySQL tends to be configured to listen for connections on the localhost and this could be preventing it to connect with n8n cloud.
Could you check what your current bind-address is set to in your MySQL? You can usually find this in the config file.
If it’s set to 127.00.1, try changing it to 0.0.0.0 and see if that allows the connection. You can also see some other options on how to configure the bind-address here :arrow_down_small:

https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_bind_address

1 Like

Just to add to this, 127.0.0.1 is localhost which is local to the machine or container, If you are using n8n in Docker or on Cloud MySQL won’t be on the internal IP.

You would need to make your database available to the outside world or use an SSH tunnel just make sure you are comfortable with any extra security or networking steps you may have to take for this.

1 Like

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