AWS EC2 - Enable remote access on mysql
I think most of us know that enable remote access, need to create a new user with
But in EC2, there are some security config need to be done.
Go to your AWS console, select the instance where you host your database (MySQL).
Then select the security group
Make sure you add a rule in the In bound there, for MySQL, and set the IP to
Edit the file
/etc/mysql/my.cnf, and change the binding address to
then restart mysql server
NOTE: bare in mind that
'foo'@'%' are consider as different user, you may have 2 different passwords for each of them