David
David

Reputation: 65

.Net CLI MySQL RDS connection failing

I am attempting to connect to my AWS RDS instance in my .Net Core app using the dotnet ef dbcontext scaffold command and am getting a very strange access denied error.

Access denied for user 'root'@'c-73-20-121-31.hsd1.ut.comcast.net' (using password: YES)

I assume that it has to do with my RDS URI containing dashes, but escaping them does not seem to do anything.

Here is the whole command that I am attempting to run:

dotnet ef dbcontext scaffold "server=xxx.xxx.us-west-2.rds.amazonaws.com;database=A1;user=user;pwd=pwd;" "Pomelo.EntityFrameworkCore.MySql" -o .\Models -f

I am using .Net CLI version 2.1.0 on Windows 10. I am currently connected to the RDS instance using MySQL Workbench without any issue.

If you have any idea, I would greatly appreciate the help!

Please let me know if you need any additional information.

Thanks!

Upvotes: 0

Views: 159

Answers (1)

David
David

Reputation: 65

Still not entirely sure why I was getting that strange connection hostname, but it was in fact a bad password that was preventing me from gaining access.

I updated my VS to the latest version 15.7.4, updated my project to the latest .Net Core, 2.1, which resolved a lot of the headache that I was running into prior to getting this connection error. But what ultimately resolved the issue was double checking my username and password.

Just another case of not keeping track of login credentials.

Upvotes: 1

Related Questions