[Glue] Fail to connect to MySql running on EC2

0

I am trying to connect to MySql which is running on EC2 instance in VPC. However, I got the following error message and could not crawl tables.
ERROR : Could not find S3 endpoint or NAT gateway for subnetId: subnet-xxxx in Vpc vpc-xxxxx

I already created security group for Glue (http://docs.aws.amazon.com/ja_jp/glue/latest/dg/populate-add-connection.html) and attach it to EC2 instance and glue.

So does anyone know how we can connect to MySql running on EC2? Is there any special settings I have to do for this problem?

I am guessing that there is network issues because AWS says that Glue supports MySql running on Amazon EC2.
https://aws.amazon.com/glue/faqs/?nc1=h_ls

Edited by: Masahiko on Dec 28, 2017 3:51 AM

질문됨 6년 전492회 조회
3개 답변
0

Now I can connect to MySql which is running on EC2 instance.

What we did:

  1. replaced NAT instance with NAT gateway
  2. Set security group to EC2 instance
답변함 6년 전
0

Hello Masahiko,

Can you please help me how you were able to connect to MySQL running on EC2. I am having difficulty for the same.

here is what I have done so far -

  1. Launched Linux Public EC2.
  2. Launched Linux Private EC2. Created NAT Gateway.
  3. Connected private EC2 through Public EC2 and Installed MySQL Server on private EC2.
  4. Created Database Employee on MySQL Server.
  5. GRANT ALL PRIVILEGES ON Employee.* TO 'root'@'<Private EC2 IP>' IDENTIFIED BY '<password>';
  6. Inbound Security group attached to Private EC2 instance -
    All TCP TCP 0 - 65535 sg-<SG ID>
    MYSQL/Aurora TCP 3306 0.0.0.0/0
  7. JDBC URL while setting up connection from Glue to MySQL DB
    jdbc:mysql://ip-<ip address>.ec2.internal:3306/Employee

Error I am getting is - "Host 'ip-<ip address>.ec2.internal' is not allowed to connect to this MySQL server"

Can you please help?
Please let me know if I need to provide any more details about it.

Thanks,
Dhiraj

답변함 5년 전
0

I am able to connect to MySQL DB installed on Private EC2 instance now. Performed everything from scratch right from dropping and recreating VPC and all steps I mentioned in earlier post. Able to crawl MySQL Tables into Glue Catalog DB now.

Thanks,
Dhiraj

답변함 5년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠