C# Tutorial
Sample connection string and it raises the above MySqlException,
string conStr = "Server=localhost;Database=shivpedia;port=3306;User Id=root;password=test;";
How to resolve this mysql database connectivity issue in C# .NET application ?
1. Please open mysql installer community application in microsoft windows 2010, and you can see MySQL server version and Reconfigure option.
2. Click on Reconfigure option and check the Authentication method,
3. If Authentication method is selected as Use Strong Password Encryption for Authentication, then we need to use MySQL 8.0 Connectors and Community drivers liibmysqlclient 8.0 to support this method. Otherwise change the Authentication method to Use Legacy Authentication Method and set hte root password to connect the mysql database in VisualStudio C# applications.
Rebuild the application and test the application to connect the database issue.
Now we could connect the MySql database in C# code.
Privacy Policy | Copyright2020 - All Rights Reserved. | Contact us | Report website issues in Github | Facebook page | Google+ page