[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

demandé il y a 6 ans492 vues
3 réponses
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
répondu il y a 6 ans
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

répondu il y a 5 ans
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

répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions