Hello Community,
I'm facing an issue connecting to a MySQL database hosted on AWS RDS from within a Data bricks notebook. My Python script to connect to MySQL works fine locally, but when I run it in Data bricks, I receive this error:
Error connecting to MySQL: (2003, "Can't connect to MySQL server (timed out)")
Additional Details:
- Credentials: Confirmed correct (work locally).
- Code: Using a standard pymysql connection within Databricks.
- Troubleshooting Attempts:
- Verified credentials.
- Confirmed database is accessible from my local environment.
- Checked AWS RDS instance security settings for IP or VPC connectivity.
Any insights into why this might be happening in Databricks, and how to resolve it, would be greatly appreciated!
Thank you!