Reputation: 1242
I've recently encountered a phenomenon that absolutely baffled me. So far, I've been connecting without any problem to an Amazon RDS instance running MySQL. Right now, I'm trying to migrate to DB in the free tier - running on Microsoft Express Edition.
I've properly set up the security of the instance and can connect to it through SQL Explorer in Visual Studio 2012. However, I can't access it through Python (MySQLdb - same credentials, and same script that worked with first db):
2013, Lost connection to MYSQL server at 'reading initial communication packet', system error 104
Nor through MySQL-Front
- connection failure.
I can't wrap my head around it - am I missing something obvious? Exactly the same thing happens on two machines - VS can connect, while nothing else can. Ideas?
Python connection attempt:
db = MySQLdb.connect(host = "yep-my-endpoint.us-west-2.rds.amazonaws.com",
user="user",passwd="mypasswd", port=1433, db="yep-db-name")
Is there maybe some setting that I have to set in connection for it to work? I failed to find anything related.
Upvotes: 2
Views: 4787
Reputation: 86
Have you checked your Amazon RDS Security Groups? Please note that in some cases, you'll need to add the IP address from which you're connecting. In that case, select a Security Group from the left menu, edit it and add the CIDR/IP.
Upvotes: 2