Forum Discussion

khoibui's avatar
khoibui
New Member
8 years ago
Solved

MySQL connector: value "preferred"is not the correct type

Hello,

 

I have an issue with using Power BI to connect to a MySQL instance (without SSL encryption)

 

Power BI: Version: 2.57.5068.721 64-bit (April, 2018)

MySQL connector NET: 8.0.11

 

Error message:

 

Unable to connect

We encountered an error while trying to connect.

Details: "value 'preferred' is not the correct type."

 

Have anyone encountered this or know of a solution? I've tried to install different version of MySQL connector NET package but no luck. 

I'm able to connect via MySQL workbench

  • I had the same issue. I downgraded the mysql connector to 6.10.6 and then it workeded.

4 Replies

  • I had the same issue. I downgraded the mysql connector to 6.10.6 and then it workeded.

    • mparso1's avatar
      mparso1
      New Member

      This solution worked for me as well.

       

      Is there a reason why the latest version of the MySQL Connector/NET is causing this failure:

      Value 'Preferred' is not of the correct type

    • Armenni's avatar
      Armenni
      Frequent Visitor

      Thank you! Downgrading also worked for me.

      • arun_1047's avatar
        arun_1047
        Helper I

        Hello,

        I have installed the My SQL Connector 6.10.6 as mentioned in the message. I was able to connect to the server and created the dashboard. When i tried to schedule refresh in Power BI report Server getting the below error message.

         

         

        Power BI  Server Version : Version 1.2.6660.39920 (Build 15.0.2.389), March 2018

         

         

        "Status: Error Failed Data Refresh, Exception Microsoft.AnalysisServices.OperationException: Failed to save modifications to the server. Error returned: 'MySQL: We were unable to find a database provider with invariant name 'MySql.Data.MySqlClient'.
        This error could've been the result of provider-specific client software being required, but missing on this computer.  To download client software for this provider, visit the following site and choose the 64-bit (x64) version of, at minimum, 'MySQL Connector/Net': https://go.microsoft.com/fwlink/?LinkId=278885. The exception was raised by the IDbCommand interface.
        The current operation was cancelled because another operation in the transaction failed.
        The command has been canceled.. The exception was raised by the IDbCommand interface.
        The command has been canceled.. The exception was raised by the IDbCommand interface.
        '.
           at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.ExecuteActionWithLogging(Action methodToExecute, String description, String localizedDescription, String messageInFailure, RefreshInfo refreshInfo, DataAccessors dataAccessors, ReportEventType operation, Boolean isDataRetrieval, Boolean showInExecutionLog, Boolean sendToTelemetry)
           at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.AnalysisServicesDataRefresh.RefreshData(RefreshInfo refreshInfo)
           at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<>c__DisplayClass9.<ExecuteActionWithLogging>b__7()
           at Microsoft.PowerBI.ReportServer.WebHost.EventHandler.DataRefreshScope.<ExecuteFuncWithLogging>d__3`1.MoveNext()"