- Newest
- Most votes
- Most comments
thank you all. I was able to fix the issue. Turned out that iptable service was enabled and upon disabling it, issue resolved,
Port 3306 may only be bound ro 127.0.0.1 and not * OR the IPV6 address only. It could just not be running either.
check with netstat -an
and look for port 3306
The ec2 and security groups are correct. I have only allowed 22/443/80 on incoming of Windows Ec2.
Means From Windows Bastion traffic is allowed to Linux on port 80/443/22
Does that mean you are allowing 3306 in the inbound rules for your Linux instance's security group?
Hello.
Can I access 3306 on a Linux instance using the "telnet" command from a Windows instance?
telnet Linux-Instance-IP 3306
Also, what kind of error occurs when connecting?
For example, if a timeout error occurs, it is possible that the EC2 security group or OS firewall is denying access to 3306.
By the way, if you can log in to MySQL from a Linux instance, use the following command to allow root user access from all hosts.
rename user root@'localhost' to root@'%';
When I do telnet to the linux ip with port 3306 it says, Could not open connection to the host, on port 3306: Connect failed.
Also rename user root@'localhost' to root@'%'; didn't work.
But attached is the output from the netstat -lntp command shows port 3306 is not on listening mode.
In your netstat output your not even listening on port 80 or 443 and you said you were. To me it sounds like your security groups are not correct or your trying to connect to the wrong EC2
Relevant content
- asked 6 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
Please see output