MySql.Data.MySqlClient.MySqlException: “The host localhost does not support SSL connections.”

后端 未结 2 343
走了就别回头了
走了就别回头了 2020-12-02 14:22

I use MySql.Data 8.08 and .NET Core to connect to MySql 5.7.18 but following exception is being thrown:

MySql.Data.MySqlClient.MySqlException:“The host localh

相关标签:
2条回答
  • 2020-12-02 14:35

    And if you using a connection pool class, then you might have to do this way:

        string connstring = string.Format("Server=44.55.110.59; database={0}; UID=root; password=Newuser@123; SslMode = none", databaseName);
    
    0 讨论(0)
  • 2020-12-02 14:41

    I had the same problem today when moving from MySql.Data 7.0.7 to 8.0.8. I was able to move forward adding the "SslMode=none" in the connection string.

    You will endup with something like:

    server={0};user id={1};password={2};persistsecurityinfo=True;port={3};database={4};SslMode=none
    

    (replacing the values with your database details)

    0 讨论(0)
提交回复
热议问题