I want to connect to db on EC2 from my local machine, I am not able to do and have tried everything- I am using this command to connect to EC2:
mysql -uUSERNAME -hEC2_IP -pPASSWORD
This error is generated
ERROR 2003 (HY000): Can't connect to MySQL server on 'IP' (110)
I have modified my.cnf with
skip networking bind-address = 0.0.0.0
Still not able to connect to the database
The Remote Management tab is available when connecting to MySQL remotely, as the following figure shows. To access this tab, select a remote connection from the MySQL Connections pane or click New to create a new connection.
Sign in to the AWS Management Console and open the Amazon RDS console at https://console.aws.amazon.com/rds/ . In the navigation pane, choose Databases to display a list of your DB instances. Choose the name of the MySQL DB instance to display its details. On the Connectivity & security tab, copy the endpoint.
as mentioned in the responses above, it could be related to AWS security groups, and other things. but if you created a user and gave it remote access '%' and still getting this error, check your mysql config file, on debian, you can find it here: /etc/mysql/my.cnf and find the line:
bind-address = 127.0.0.1
and change it to:
bind-address = 0.0.0.0
and restart mysql.
on debian/ubuntu:
/etc/init.d/mysql restart
I hope this works for you.
There could be one of the following reasons:
Please go through following link: How Do I Enable Remote Access To MySQL Database Server?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With