Skip to content Skip to sidebar Skip to footer

What May Cause The Keynotfoundexception When Trying To Open A Mysql Connection

I trying to connect my database using C# code, but getting a KeyNotFoundException when the debugger gets to MySqlConnection Open method. I Have tried changing my connectionString t

Solution 1:

You should try removing collation-server settings in your Options tab under General settings and restart your MySQL server to resolve this issue.

OR

You can simply add the charset to the connection string:

Server=127.0.0.1;Port=3306;Database=database;User ID=root;Password=123456;CharSet=utf8;

OR

If your framework is .NET, then all you need to do is to make sure that your 'MySql.Data.dll' is up to date with the corresponding version.

Post a Comment for "What May Cause The Keynotfoundexception When Trying To Open A Mysql Connection"