Error connecting to MySQL from Databricks: (2003, "Can't connect to MySQL server")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2024 10:47 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2024 10:37 PM
is it AzureDatabricks or Databricks on GCP, AWS?
Is your Databricks Workspace in a private V-NET?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 08:23 PM
It is Databricks in AWS.