Visual Studio 2019 MySql Data Sources Failed to open connection Error

Steve Hall 21 Reputation points
2022-09-14T19:46:10.67+00:00

I'm having trouble setting up VS 2019 and MySQL together. I know you can't use VS 2022 + MySQL together, therefore looked to setup VS2019 with it so I could use the DataSources Window to drag and drop fields directly onto designer views. So started from a fresh installation of MySQL and Visual Studio 2019 on my dev machine - like both literally vanilla tonight. I used the Development installation for MySQL:

241202-lpxrh.png

So I can connect to a test database just fine with Server Explorer. I can also Add Connection fine (that is it sees the remote database), but when I come to click next on Choose your data connection, I get this error:

241203-qtst2.png

I often come across this problem every time I try to set up MySql and VS together. On this occasion, I'm working with the latest MySQL version and thus have gone for the latest MySql binaries. As I say, I've reviewed all of the historic StackOverflow posts, but cant apply them to this. Could you please advise on what the issue is, as the error message isn't particularly helpful.

thanks

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
986 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.