2
votes

I created an external user with '%' hostname to allow remote access. I get the following error while connecting the local MySQL to remote AWS RDS:

ERROR 2003 (HY000): Can't connect to MySQL server on 'instance.cvxqy8tbi2bk.us-east-1.rds.amazonaws.com' (110).

I tried commenting the #bind-address = localhost but no solution. Any pointers for this?

4
You just have to change bind-address=0.0.0.0 and then restart your MySQL. Hope it will be helpful for you - Dilip vyas

4 Answers

5
votes

Anyone encountering this issue today should check out this YouTube video at around 6:05:

AWS RDS MySQL Database Setup | Step by Step Tutorial.

In a nutshell, you have to create a new inbound security rule to allow an external connection.

0
votes

"I tried commenting the #bind-address = localhost but no solution. "

No you cannot just comment it out.

If you want to allow remote connections to the MySQL database then you need to bind to your network adapter and not localhost / the loopback adapter.

So you need to get your server IP then:

bind-address = the.srv.ip.is

This is a better question for Server Fault ;)

0
votes

You should diagnose connection to ANY Mysql/Mariadb/RDS connection before changing any server parameter.

Always use this to check connection.

mysql -u username -p  -h your_rds_instance_name

If connection fail, then check network connection(can you ping the instance name from your local system? ), i.e. firewall access, RDS Subnet rules, security groups rules. If the topics too advance for your, then follow the usual quickstart guidelines and tutorial.

-2
votes

change settings to Publicly accessible. by clicking Modify option