Skip to content Skip to sidebar Skip to footer

Can't Connect To Mysql Instance Remotely That Is Running On Ec2 Instance (not Rds)

I have seen a lot of posts that claim they are running an RDS instance of MySql in which they cannot connect to, but I am not running RDS. I used my EC2 insance to host my wordpres

Solution 1:

Based on your GRANT information, you have at least the problem of root user only having access privileges from localhost. You would need to create a root@% user (or a more specific host/IP instead of % if you have a reliable address). That would allow external access so long as your EC2 security group also allow access on port 3306 (either globally or to a more restrictive IP address or IP range).

Of course the security implication here is that you are opening up access to MySQL that you might not want to make more accessbile to potential attackers. For this reason, I would recommend you access your DB via SSH tunnel, which is supported by MySQL workbench. This will in essence allow you to shell into the host your your access key and then access as root@localhost.

Post a Comment for "Can't Connect To Mysql Instance Remotely That Is Running On Ec2 Instance (not Rds)"