I'm running a RDS MySQL server and is moving my current environment to this. I can connect fine with MySQL Workbench, but I'm getting the following, when trying to connect trough my .NET application with Entity Framework:
EntityException: The underlying provider failed on Open.
...
MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.
...
SocketException (0x2af9): No such host is known
My connectionstring looks like this:
<add name="MyEntities" connectionString="metadata=res://*/Database.csdl|res://*/Database.ssdl|res://*/Database.msl;provider=MySql.Data.MySqlClient;provider connection string="server=name.*.eu-west-1.rds.amazonaws.com,3306;user id=Username;password=Password;persist security info=True;database=DBName"" providerName="System.Data.EntityClient" />
As I can connect in MySQL Workbench, I believe the Security Settings on AWS is correct. Hopefully some of you can point me in the right direction.
Turns out, that if you leave the portnumber out of the connectionstring everything works out just fine. I think it's getting too late. At least I hope this helps someone :)
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