我在aws-glue中有一个Python shell作业,可与rds / mysql服务器通信。我在执行下面的作业时收到错误消息。我猜这是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)