I can't connect from a different IP to the MySQL Server from a C# application.
The MySQL server works fine from localhost
SocketException: No connection could be made because the target machine actively refused it XXX.XXX.XX.XX:3306
What I've tried:
- The user has access GRANT with the % hostname so it should be fine from an external IP
- Currently the Ubuntu firewall is disabled for purposes of troubleshooting this
- I have placed in the MySQL my.conf
bind-address
=0.0.0.0
and #skip-networking
Still, the same error message prevails when trying to connect.
string connstring = string.Format("Server=XXX.XXX.XX.XXX;Port=3306; database={0}; UID=user; password=pswd", databaseName);
connection = new MySqlConnection(connstring);
connection.Open();
Any tips? Thanks!