【发布时间】:2019-05-21 14:41:35
【问题描述】:
嗨,在此实例中,数据库安全组对所有入站流量(所有端口 - 所有来源)开放。
我还可以在 mysql workbench 或 Datagrip 中很好地连接到数据库,这肯定使用 jdbc 连接字符串。
2019-05-21 14:12:03 INFO CatalogClient:651 - Got connection 'tem-sas-main' info from Catalog with url: jdbc:mysql://my-database-example:3306/sas_tem_central
2019-05-21 14:12:03 INFO CatalogClient:684 - JDBC configuration for connection tem-sas-main: JDBCConfiguration(url=jdbc:mysql://my-database-example:3306/sas_tem_central, hostname=my-database-example, port=3306, databaseVendor=mysql, databaseVersion=null, connectionName=tem-sas-main, path=sas_tem_central, subnetId=subnet-0717c4db096e84393, availabilityZone=eu-west-1a, securityGroups=[sg-074b074ebc51c2315], enforceSSL=false)
2019-05-21 14:12:03 INFO JdbcConnection:42 - Starting connecter. driver com.mysql.jdbc.Driver@7e5d9a50
2019-05-21 14:12:03 INFO JdbcConnection:60 - Attempting to connect with SSL host matching: jdbc:mysql://my-database-example:3306/sas_tem_central
2019-05-21 14:14:15 INFO JdbcConnection:69 - SSL connection to data store using host matching failed. Retrying without host matching.
2019-05-21 14:14:15 INFO JdbcConnection:83 - Attempting to connect with SSL: jdbc:mysql://my-database-example:3306/sas_tem_central
2019-05-21 14:16:26 INFO JdbcConnection:88 - SSL connection to data store failed. Retrying without SSL.
2019-05-21 14:16:26 INFO JdbcConnection:102 - Attempting to connect without SSL: jdbc:mysql://my-database-example:3306/sas_tem_central
Check that your connection definition references your JDBC database with correct URL syntax, username, and password. Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
还要注意我的 JDBC 连接字符串是
jdbc:mysql://my-database-example:3306/sas_tem_central
并且要求 SSL 连接设置为 false
【问题讨论】:
-
您的 MySQL 实例是否通过 SSL 保护?如果是这样,那么您需要使用来自公认的公共证书颁发机构的证书:docs.aws.amazon.com/quicksight/latest/user/…
-
你是如何尝试用胶水连接的。请提供一些代码sn-p。
-
@HarshBafna 我正在尝试通过 JDBC 连接进行连接,我的连接字符串是“jdbc:mysql://my-database-example:3306/sas_tem_central” - 还需要 SSL 连接为 false
-
我假设您提供了一些用于在胶水 etl 中连接到 MySQL 的 spark 代码。你能分享一下你正在做的事情吗?
-
@FaizRasool :您是否在粘合连接中配置与附加到 RDS 实例的 VPC/安全组相同的 VPC/安全组。
标签: mysql amazon-web-services jdbc aws-glue