Go to the Remote Database Access page in your cPanel dashboard.
You will see a list of IP addresses and hostnames available for remote access.
Try using any of these IP addresses or hostnames as the host in your database connection settings.
Keep trying the options until you find the one that successfully connects.
Since Node.js acts as a separate server, it requires remote access permission to communicate with your cPanel's MySQL server.