I have mysql database server installed on ubuntu in t1.micro ec2 :

Instance state: running
Public IP: 50.xxx.xxx.xxx
Instance type: m1.medium
Elastic IP: 50.xxx.xxx.xxx
Private DNS: ip-xxx-xxx-xxx-xxx.us-west-1.compute.internal
Availability zone: us-west-1a

I create another instance, this one using t2.micro so it's using vpc

Instance type: t2.micro
Elastic IP: 52.xxx.xxx.xxx
Private DNS: ip-xxx-xxx-xxx-xxx.us-west-1.compute.internal
Availability zone: us-west-1a
Private IPs: 17x.xxx.xxx.xxx
Security groups: default. view rules
Secondary private IPs: Scheduled events
No scheduled events
VPC ID: vpc-25xxxxxx
AMI ID: ubuntu-trusty-14.04-amd64-server-20150325 (ami-xxxxxxxx)
Subnet ID: subnet-9cxxxxxx

I'm deploying website in t2.micro and want to access mysql server in t1.micro. I've edited my.cnf configuration to comment #bind_address. In the t1.micro security group I've tried to add new inbound rule to access mysqlserver :

type : mysql
protocol : tcp
port : 3306
source : private ip of my t2.micro instance 17x.xxx.xxx.xxx.

My website could not access the server.

  • Did t1.micro has private IP? – masegaloeh May 8 '15 at 5:05
  • @masegaloeh it has public/elastic ip Public IP: 50.xxx.xxx.xxx – Fatimah Wulandari May 8 '15 at 6:18

You will need to set up ClassicLink to allow your classic EC2 instance to communicate with your new instance in the VPC.

This has two steps:

  1. Edit the VPC to enable ClassicLink. Click your VPC in the list of VPCs, select Actions, then Enable ClassicLink.

  2. Attach the classic instance to the VPC. Click your old instance in the list of instances, select Actions, ClassicLink, Link to VPC.

  • I've follow your step, so, what to do then? how to communicate? tried to ping classic ec2 private ip from t2.micro, but failed. – Fatimah Wulandari May 8 '15 at 6:28
  • the definition of ClassicLink : allows you to link EC2-Classic instances to a VPC, so that you can communicate with resources in the VPC using private IP addresses. so this's just one way, I could'not communicate form vpc to ec2 classic instance? – Fatimah Wulandari May 8 '15 at 7:01
  • ah yes, this is one way? I've tried create new inbound rule in my vpc security group for ec2 classic instance, and ping it, works. but I could not communicate from t2.micro to t1.micro. – Fatimah Wulandari May 8 '15 at 7:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.