Now I can connect to MySql which is running on EC2 instance.
What we did:
- replaced NAT instance with NAT gateway
- Set security group to EC2 instance
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 -
- Launched Linux Public EC2.
- Launched Linux Private EC2. Created NAT Gateway.
- Connected private EC2 through Public EC2 and Installed MySQL Server on private EC2.
- Created Database Employee on MySQL Server.
- GRANT ALL PRIVILEGES ON Employee.* TO 'root'@'<Private EC2 IP>' IDENTIFIED BY '<password>';
- 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
- JDBC URL while setting up connection from Glue to MySQL DB
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.
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.
Unable to connect remotely to MySQL on Node.js imageAccepted Answerasked 4 years ago
[Glue] Fail to connect to MySql running on EC2asked 5 years ago
how to connect to an mysql comm server 5.7 on ec2 from another ec2 instanceasked 3 years ago
Connect to the database in an EC2 instance from the ECS clusterAccepted Answerasked a month ago
How to connect MySQL database in nodeJS file.asked 2 years ago
Error while try to connect to DB using jdbcasked 2 months ago
Docker is not able to pick IAM role when running on EC2 instanceasked 6 months ago
How to fix the error Failed to connect to your instance?asked 21 days ago
Unable to connect to EC2 instance in private Subnetasked a year ago
I can't connect to my EC2 instance.asked 5 months ago