cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ivancans
Frequent Visitor

Power BI + MySQL - Unexpected error: Connection must be valid and open

Hi everybody,

 

When trying to manipulate (pivot a column) appended MySQL queries, I get

"Unexpected error: Connection must be valid and open" message.

The weird thing is that even though individual queries (consisting of this year's months)are working AND append with first six months of the year is working, for the last months it does not. Connection type and settings have not been changed. Connection was made with MySQL database.

I have no idea how to solve this. If you need any other detail from, please ask.

1 ACCEPTED SOLUTION

Hi @v-yuta-msft ,
It works now because of one of two things. Either new release of Power BI solved it or doing something that helped me with ole db or odbc error, that something being - deleting existing connetion to dwh and creating it from scratch.

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

Hi ivancans,

 

Are you trying to write query like "insert" in sql statement in power bi desktop when connect to mysql. If you are, this is not supported in power bi, you can only write sql statement like "select from where". In addtion, if error happens during data refresh in power bi, could share your connection string and error messages in trace logs?

 

Regards,

Jimmy Tao

Hi @v-yuta-msft

 

Only SELECT statements. Also, when I tried to paste the error message here it said that it is too long. 

Error happens when Power BI is working on pivoting a column. Is there a place in Power BI from which I could get a different error message for me to show you?

Hi ivancans,

 

You can also trace your query in SQL profiler if you have installed sql server on your machine. If you have solved your issue, could you please kindly mark my answer?

 

Regards,

Jimmy Tao

Hi @v-yuta-msft ,
It works now because of one of two things. Either new release of Power BI solved it or doing something that helped me with ole db or odbc error, that something being - deleting existing connetion to dwh and creating it from scratch.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors