I'm trying to break down the task of doing AWS debugging on rubymine into smaller chunks. I would like to connect to the mysql server running on AWS. So I did the following:
first: Establish an ssh tunnel to forward all localhost requests to port 3307 to the port 3306 on AWS:
ssh -l ubuntu -i 'path/to/private/key/privateKey.cer' -L 3307:aws.port:3306 aws.port -N -v -v
second: connect to mysql on port 3307
mysql -h 127.0.0.1 -P 3307 -u root -p
problem: it fails with the following error on my host machine:
ERROR 1130 (HY000): Host '178.135.138.61' is not allowed to connect to this MySQL server
and the log on AWS outputs this:
debug1: Connection to port 3307 forwarding to 54.193.1.19 port 3306 requested. debug2: fd 7 setting TCP_NODELAY debug1: channel 2: new [direct-tcpip] channel 2: open failed: connect failed: Connection refused debug2: channel 2: zombie debug2: channel 2: garbage collecting debug1: channel 2: free: direct-tcpip: listening port 3307 for 54.193.1.19 port 3306, connect from 127.0.0.1 port 64938, nchannels 3
notes:
- I made sure that the security group of the aws server i'm connecting to allows
ssh
connections on port 22 - I made sure that
/etc/hosts.deny
on AWS doesn't have localhost or 127.0.0.1 listed.
ideas?
/etc/mysql/my.cnf
and updatedbind-address
to0.0.0.0
.. but still no luck.. ideas?