Error in calling mysql database in C #: "The given keyword is not in the dictionary", the solution

Error connecting to mysql database in C #: "The given keyword is not in the dictionary", the solution

1. The cause of the problem

C # connection to MySql database reports an error: the given keyword is not in the dictionary, which is caused by the inconsistency of the character set encoding used by the connection and the database

2. Solution

Solution 1: The official website of MySQL has fixed bugs in version 6.0.8. Upgrade MySql.Data.dll to the latest component. (Successful test)
Option 2: The database code is utf8mb4, and the code specified when connecting is utf8, so modify the database code to utf8, as shown in the following figure
Insert picture description here

Published 30 original articles · Like1 · Visits1158

Guess you like

Origin blog.csdn.net/chunchunlaila/article/details/105184553