Amazon EC2 - Unable to connect to MySQL
- by alexus
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?