Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MarkJEverest
New Member

Power BI Report Server cannot connect to MySQL despite the client drivers being installed

Hi,

 

We have PowerBI Server installed on two boxes - one for test and one for production.

On both we have installed the .NET MySQL connector 8.0.28 and rebooted the servers.

When looking in ODBC (64-bit) in control panel the latest MySQL drivers are showing as installed, so I know the installation has gone fine.

 

On the test server when I go to the data source section of a report and enter credentials to connect to the MySQL instance it works finem and data synchronises in the schedule.

 

However, when I try and do the same thing on the production server I get the following error after clicking the "Test connection" button:

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

 

I am at a loss as to why one server works, but the other does not.

 

Has anyone got any ideas what else I can check please? Our IT department have rebooted the server again just to check but this has not helped.

 

Thanks

1 ACCEPTED SOLUTION
d_gosbell
Super User
Super User


@MarkJEverest wrote:

When looking in ODBC (64-bit) in control panel the latest MySQL drivers are showing as installed, so I know the installation has gone fine.

 

The ODBC drivers are registered differently to the .net drivers so you cannot assume that the .net drivers are OK just because the ODBC ones appear to be there.

 


@MarkJEverest wrote:

However, when I try and do the same thing on the production server I get the following error after clicking the "Test connection" button:

MySQL: We were unable to find a database provider with invariant name 'MySql.Data.MySqlClient'.


I would suggest trying to uninstall and the re-install checking the options that are chosen as this suggests that there is an issue registration of the .net drivers.

View solution in original post

3 REPLIES 3
richaaldo
New Member

I will share my findings because I have struggled with this error for a few weeks. Although I'm a noob in tech, I managed to sort out the issue.

I started having the following error when selecting the MySQL data source connection in Power BI:
"This connector requires one or more additional components to be installed before it can be used."

With a 'Learn more' option to redirect to downloading the latest connector version from MySQL.

I did uninstall and reinstall that SEVERAL times, and still I could not do anything about that error, so tried finding different ways to access.

Adding the MySQL query in the "Blank Query" format helped me a lot finding the new error:

"DataSource.MissingClientLibrary: We were unable to find a database provider with invariant name 'MySql.Data.MySqlClient'."

Looking it in the internet helped me finding part of the info. I did install the WebCommunity MySQL installer. After that, the connector got upgraded and the error changed to the following:

"An error ocurred creating the configuration section handle for system.data: Column 'InvariantName' is constrained to be unique. Value 'MySql.Data.MySqlClient' is already present. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 152). This is a configuration issue with the file 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config'."

I accessed the file and noticed that it is an XML file which includes the following:

<system.data>

    <DbProviderFactories>

        <add name="MySQL Data Provider"....

        <add name="MySQL Data Provider"....

        <add name="MySQL Data Provider"....

        <add name="MySQL Data Provider"....

    </DbProviderFactories>

</system.data>

And the only thing I needed to do, is:

- Uninstall all the connectors I did install previously

- Remove all rows from that section

- Reinstall the latest version of the connector

- Test it again (NOT EVEN NEEDED TO CLOSE POWER BI)

I REALLY hope this helps everyone with the same issue. 

v-henryk-mstf
Community Support
Community Support

Hi @MarkJEverest ,

 

Whether the advice given by @d_gosbell  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

d_gosbell
Super User
Super User


@MarkJEverest wrote:

When looking in ODBC (64-bit) in control panel the latest MySQL drivers are showing as installed, so I know the installation has gone fine.

 

The ODBC drivers are registered differently to the .net drivers so you cannot assume that the .net drivers are OK just because the ODBC ones appear to be there.

 


@MarkJEverest wrote:

However, when I try and do the same thing on the production server I get the following error after clicking the "Test connection" button:

MySQL: We were unable to find a database provider with invariant name 'MySql.Data.MySqlClient'.


I would suggest trying to uninstall and the re-install checking the options that are chosen as this suggests that there is an issue registration of the .net drivers.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors