Amazon EC2 - Unable to connect to MySQL

Posted by alexus on Server Fault See other posts from Server Fault or by alexus
Published on 2014-06-10T21:56:11Z Indexed on 2014/06/11 15:29 UTC
Read the original article Hit count: 238

Filed under:
|
|

I'm having issue connecting from one VM to another

# nmap -p3306 ip-XX-XX-XX-XX.ec2.internal

Starting Nmap 6.40 ( http://nmap.org ) at 2014-06-10 17:50 EDT
Nmap scan report for ip-XX-XX-XX-XX.ec2.internal (XX.XX.XX.XX)
Host is up (0.000033s latency).
PORT     STATE  SERVICE
3306/tcp closed mysql

Nmap done: 1 IP address (1 host up) scanned in 1.05 seconds
# 

in my Security Group I allowed Inbound connectivity via port TCP, portrange 3306 and Source 0.0.0.0/0, so theoratically it should work, but in reality it doesn't(

I'm running red hat enterprise linux 7 on both VMs. mariadb.service running fine on another VM and I am able to connect to it locally.

DB's:

# netstat -anp | grep 3306
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      2324/mysqld         
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
# 

Any ideas what else I missed?

© Server Fault or respective owner

Related posts about mysql

Related posts about amazon-ec2