Is port 3306 open by default when installing n8n via docker on digitalocean?

I am a total newbie on n8n and dockers etc.

i have manage to install n8n successfully and tried playing around with it.

as i tried to setup the mysql node . i am having problem accessing my mysql database on a different server. i get the connection timeout error when setting up the credential for the first time.

hope someone can guide me on this. thanks a million

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:

Hi @Laurent_Yew

If your MySQL Database is on another server then pot 3306 will need to be open on that server rather than your n8n server. Your MySQL will also need to be configured to accept external requests too.

How you do that will depend on how MySQl is installed (i.e. directly installed on the server, in cPanel or another hosting panel) etc.

Hi thanks , yes , the server port 3306 is opened on my server . as i can connect remotely to it via heidi sql.

my mysql server is hosted on hostinger which i have setup to enable it to accept connection from any host

@Laurent_Yew is it attached to a website in Hostinger or did you install MySQL on a VPS? I just tried this on my own Hostinger account with a test website and was able to connect OK without issue. I’m not able to test with VPS with Hostinger as I don’t have one setup

The db is not tied to a website. I basically just setup a mysql database on a normal web hosting plan. Not a vps

That’s how I connected in my test and was able to connect straight away. I guess if you are sure that you have connected using the same details as HeidiSql then it should work - the correct hostname provided at the top of the remote connection screen, the right database username and password, the right database and remote connection is definitely enabled for all hosts, then last things I can suggest:

  1. Does your database password include any special characters such as $. I had some issues once running things in MySQL at the commend line with a password with a special character and once removed it solved the issue
  2. On your n8n server, use a terminal and get the container ID of your n8n container. You can find that by typing docker ps to find it. Retry or better still remove and re-add the MySql credentials in your workflow and, if the issue still happens, head back to the terminal and type docker logs CONTAINERID (of course replacing CONTAINERID with the actual ID) and see if it shows any other errors than the timeout message you get
  3. All else fails, reach out to Hostinger support to see if then can suggest anything

Or maybe someone else can suggest something else to help.