Home > Enterprise >  I am using Windows and i want to use aws MYSQL database by using the following commad. Please help m
I am using Windows and i want to use aws MYSQL database by using the following commad. Please help m

Time:07-19

ssh -i "key_pair.pem" [email protected]

and I want use DB like cms and I want to use this by using the command

-L 3000:xyz.ap-southeast-1.rds.amazonaws.com:3306 -N

I am totally confused, please help Thanks in advance.

CodePudding user response:

To do local forward(from ec2 to your system)

ssh -i <pem key> -NfL localhost:<your local port>:<instanceip>:<your sql port> <user>@<instance ip>

To do remote forward(from your local system to EC2)

Make sure AllowTCPForwarding yes present in /etc/ssh/sshd_config file by default it's not enabled

Ref: Remote port forwarding failed on Amazon EC2

ssh -i keyPair.pem -R 52698:localhost:52698 [email protected]

Also, make sure your EC2 security group allows access to MySql port default(3306)

  • Related