Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-424

Can't open connection from .NET apllication to MySQL 8.4

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.2.2
    • 3.2.3
    • General
    • None
    • Windows 11
      .NET 4.8
      MySQL Server 8.4.0-1.el9

    Description

      I created MySQL 8.4 database in docker by command like

      docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=Supercalifragilisticexpialidocious mysql:8.4
      

      When I try to connect from .NET appliaction with connection string like

      $"Driver={{MariaDB ODBC 3.2 Driver}};Port=3306;SSLVERIFY=0;Server={dbServerAddress};User=root;Password=Supercalifragilisticexpialidocious;Option=67108864"
      

      I recevie exception

      System.Data.Odbc.OdbcException : No message provided
         at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
         at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
         at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
         at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
         at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
         at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
         at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
         at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
         at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
         at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
         at System.Data.Odbc.OdbcConnection.Open()
      

      Attachments

        1. maodbc.zip
          809 kB
        2. trace.LOG
          4 kB

        Issue Links

          Activity

            Could you please try to change authentication plugin for your user to mysql_native_password? If still not, I've attached here driver library with small fix in zip archive. Hopefully you can try it(and the plugin should still be mysql_native_password)

            Lawrin Lawrin Novitsky added a comment - Could you please try to change authentication plugin for your user to mysql_native_password? If still not, I've attached here driver library with small fix in zip archive. Hopefully you can try it(and the plugin should still be mysql_native_password)
            tomas.vladik Tomas Vladik added a comment -

            I was not able to configure my docker correctly for mysql_native_password.

            But I can confirm, that with provided 64bit DLL the connection to MySQL 8.4 works.

            tomas.vladik Tomas Vladik added a comment - I was not able to configure my docker correctly for mysql_native_password. But I can confirm, that with provided 64bit DLL the connection to MySQL 8.4 works.

            Thank you very much! As a matter of fact I can't repeat the issue with authentication plugin I had seen at that moment any more. Not sure what it was, but since you can't see it as well, probably plugins are not relevant to the problem.

            Lawrin Lawrin Novitsky added a comment - Thank you very much! As a matter of fact I can't repeat the issue with authentication plugin I had seen at that moment any more. Not sure what it was, but since you can't see it as well, probably plugins are not relevant to the problem.
            tomas.vladik Tomas Vladik added a comment -

            Will be the fix GA soon?

            tomas.vladik Tomas Vladik added a comment - Will be the fix GA soon?

            The release is expected to be in end of July/beginning August

            Lawrin Lawrin Novitsky added a comment - The release is expected to be in end of July/beginning August

            The fix have been pushed

            Lawrin Lawrin Novitsky added a comment - The fix have been pushed

            People

              Lawrin Lawrin Novitsky
              tomas.vladik Tomas Vladik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.