【发布时间】:2020-02-05 19:39:02
【问题描述】:
我在 aws-glue 中有一个与 rds/mysql 服务器通信的 Python shell 作业。运行以下作业时收到错误消息。我猜是mysql服务器的安全组设置。如何更新 SG 以允许来自 aws-glue 作业的连接?
mysql.connector.errors.InterfaceError: 2003: 无法连接到 MySQL 服务器在 xxxxx.rds.amazonws.com:3306
我在代码中使用 python mysql-mysql-connector 与 mysql 服务器通信
conn = connector.connect(user='dustin', password='sun',
host='xxxx.us-east-1.rds.amazonaws.com',
database='mydb')
cursor = conn.cursor(dictionary=True)
cursor.execute(sql)
【问题讨论】:
-
你在设置连接和VPC时关注docs.aws.amazon.com/glue/latest/dg/…了吗?
-
感谢您指出正确的方向。@bdcloud 您可以发布答案吗?我会接受的
标签: amazon-web-services aws-glue aws-security-group