Connect to Amazon RDS with Entity Framework

I start the MySQL RDS server and port the current environment to this. I can connect perfectly with MySQL Workbench, but when I try to connect through my .NET application with the Entity Framework, I get the following:

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 connection string looks like this:

    <add name="MyEntities" connectionString="metadata=res://*/Database.csdl|res://*/Database.ssdl|res://*/Database.msl;provider=MySql.Data.MySqlClient;provider connection string=&quot;server=name.*.eu-west-1.rds.amazonaws.com,3306;user id=Username;password=Password;persist security info=True;database=DBName&quot;" providerName="System.Data.EntityClient" />

How can I connect to MySQL Workbench, I believe that the security settings on AWS are correct. I hope some of you can point me in the right direction.

+4
source share
2 answers

It turns out that if you leave the port number from the connection string, everything will be fine. I think it's too late. At least I hope this helps someone :)

+4
source

. -

0

Source: https://habr.com/ru/post/1599685/


All Articles