温馨提示:本文翻译自stackoverflow.com,查看原文请点击:amazon web services - aws rds/mysql security group for aws-glue python shell jobs
amazon-web-services aws-glue aws-security-group

amazon web services - 适用于aws-glue python shell作业的aws rds / mysql安全组

发布于 2020-04-21 13:59:28

我在aws-glue中有一个Python Shell作业,可与rds / mysql服务器对话。我在执行下面的作业时收到错误消息。我猜这是mysql服务器的安全组设置。如何更新SG,以允许通过aws-glue作业进行连接?

mysql.connector.errors.InterfaceError:2003:无法连接到xxxxx.rds.amazonws.com:3306上的MySQL服务器

我在代码中使用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)

查看更多

提问者
Dustin Sun
被浏览
26
Prabhakar Reddy 2020-02-07 12:39

看来您需要修改安全组,才能接受来自Glue作业的连接。由于您没有在问题中提及安全组,因此很难说出问题所在。因此,请参考链接并确保正确配置它们。