[Developer Notes] C# connection mysql problem record

1. Overview: C# reports an error when calling mysql.data.dll to connect to the local database, but the connection to the mysql server on the remote Linux server is normal

2. Error record , current connection string

   <add key="dbString" value="server=localhost;port=3306;user=root;password=root; database=id3net" />

  

  The host does not support ssl connection, so do not use ssl connection

3. The solution is to append SSLMode=none to the connection string.

   <add key="dbString" value="server=localhost;port=3306;user=root;password=root; database=id3net;SslMode=none" />

  

4. Another Water

  Why do you want water? Because I couldn't find how to close this ssl connection after searching for a long time, I finally found the answer on Stack Overflow. . Post someone else's solution .

  

  

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325650464&siteId=291194637