Hi, I have a problem setting up a connection to the MySQL database. I keep getting connect error “ERROR: connect ETIMEDOUT”. IP address added to Whitelist (51.116.108.244).
Generally, I want new rows in the database to be added to Google Sheets and I don’t know how to do that.
ERROR:
ERROR: connect ETIMEDOUT
Error: connect ETIMEDOUT
at Object.createConnection (/usr/local/lib/node_modules/n8n/node_modules/mysql2/promise.js:231:31)
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/MySql/MySql.node.js:154:41)
at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/src/Workflow.js:492:37)
at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:395:62
This is how I created a new n8n user in MySQL. Because I want to keep it separate.
CREATE USER 'n8n'@'IP' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'n8n'@'IP' WITH GRANT OPTION;
FLUSH PRIVILEGES;
In my case. The MySQL Database in Present in Different Server. (This works on the Same Server too)
Example:
CREATE USER 'n8n'@'51.116.108.244' IDENTIFIED BY 'PASSWORD';
GRANT ALL PRIVILEGES ON *.* TO 'n8n'@'51.116.108.244' WITH GRANT OPTION;
FLUSH PRIVILEGES;
I tried to connect to the Database from Integromat and Zapier and everything was ok.
I checked in n8n.cloud and n8n installed on Docker and the problem is on both.