Reputation: 41
I am attempting to host a MySQL database on an AWS server and allow it to be queried from other machines (for the purpose of an app/website being developed).
I am a bit new to server-side administration so please bear with me.
I have no problem accessing and querying from mysql on the machine locally after I ssh in, however if I try to connect from my local machine via:
mysql -u <username> -p -h <domain>
I get:
ERROR 2003 (HY000): Can't connect to MySQL server on <domain> (111)
Trying it on another machine altogether gives the same error but with (61) instead of (111). I have already created my username and allowed access from any host via:
GRANT ALL PRIVLEGES ON <table name> TO 'user'@'%' IDENTIFIED BY <password>
I have also made sure that port 3306 is open and changed the bind-address to 0.0.0.0 in the my.cnf file.
Any help would be appreciated. Thank you!
Upvotes: 1
Views: 1461
Reputation: 41
The conf file was actually at /etc/mysql/mysql.conf.d/mysqld.cnf
Changing the bind-address = 0.0.0.0 in this file instead worked.
Upvotes: 2