Connection timedout toward pymysql

Hello,
I’ve created a MySQL database on my Window to let render to connect to.

ERROR:
pymysql.err.OperationalError: (2003, “Can’t connect to MySQL server on ‘server ip’ (timed out)”)

To deal with this error, so far I’ve:
no bind-address, no skip-networking for database,
a user with the wildcard % instead of localhost limit,
extend max-user-port to 65534,
extend TcpTimedWaitDelay to 30(tcp wait delay short on most Window).

I ran out of configs to change on my machine, maybe it’s something I should adjust from the web service? Or any help?

Hi there,

Have you tried adding your Render service’s public IP(s) to the database’s IP allow list? Omitting that step causes a lot of connection errors in these situations.

Let us know if you have any further questions.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

Sorry, not so sure if you meant specifying ip connection like the following:
image
I suppose this isn’t what you meant by whitelisting since I’ve already set up a wildcard for it.
Currently using MySQL workbench, any more specific action I should take?

Hi there,

Alas, I am not an expert on how this is done in MySQL, but there are many resources online to help guide you. Here’s a Stack Overflow post that may be helpful. Here’s a link to the MySQL official docs.

Hope that helps!

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)

I need to make sure it’s able to access to the database so I can purchase the ssh access function.

Hi there,

Where is this third party database hosted? If it’s not Render, you will likely be better off reaching out to that service for support here. We can’t really provide support for a database not hosted on our service.

Regards,
Mike


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)