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
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.
@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
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:
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
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
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.