Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

When connecting to the mysql database, an exception appears

can anyone help me, I am trying to connect mysql database, the server details are entered correctly, but when I call the open method, the program throws an exception.

enter image description here

I also used Server explorer, in this case the program sees the server, but I don’t know how to use the database connected through Server explorer, that is, how to add it to the project itself.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

Please tell me how to fix this error, or how to use the database through Server explorer.

>Solution :

Looking at your code, you are using System.Data.SqlClient which is a .NET Data Provider for SQL Server.

In your question you state that you try to connect to a mysql database. Use the appropriate nuget package for that

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading