Power bi mysql fatal error encountered during data read

Hello ,   I'd say there was an error on one of the steps, perhaps it wasnt shown on the query editor, (you'd need to refresh in every single step), and there's also the possibility that some data that wasnt being loaded in the query editor was causing the error (i.e, a  # when a numeric value is exp...

  • All forum topics


  • Previous Topic

  • Next Topic

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎09-10-2018

11:54 PM

Hi all, 

I encountered the error message when applying query changes as below:

OLE DB or ODBC error: [DataSource.Error] MySQL: Fatal error encountered during data read.

I have checked the DB connection and the database all work fine. Can anyone advise? 


Message 1 of 11

41,037 Views

1 ACCEPTED SOLUTION

Salvador

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎09-11-2018

03:48 AM

Hello @Anonymous,

I’d say there was an error on one of the steps, perhaps it wasnt shown on the query editor, (you’d need to refresh in every single step), and there’s also the possibility that some data that wasnt being loaded in the query editor was causing the error (i.e, a  # when a numeric value is expected, i’ve suffered a couple of times by replacing # by empty spaces after setting the data type to numeric, even tough it might work in the query editor, when the full data set is loaded it will give an error)


Message 5 of 11

41,067 Views


  • All forum topics


  • Previous Topic

  • Next Topic

10 REPLIES 10

Prajna

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎02-16-2022

05:53 PM

Hi, 

I’m getting same error while importing a view from MySQL.
The data has around 1 lakh record and I haven’t applied any steps others than importing the view from MySQL.
Any help would be appreciated.

Thank you.


Message 10 of 11

11,962 Views

hilmandenis

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎10-28-2019

08:22 PM

In my case, the root cause is probably a hardware issue. Because when I try to refresh it from my laptop, no matter how Applied Steps is arranged, it still shows the error. But when I give it to my manager, it’s just working fine :neutral_face:


Message 8 of 11

36,284 Views

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎09-11-2018

03:16 AM

I managed to get rid of this error message by redoing the query steps, one by one. After completing one step then i click on close and apply and save after the applying steps succeed and repeat for second steps.

Anyway, i would like to know the root cause of it so that i can prevent it in future. 


Message 4 of 11

41,022 Views

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎05-21-2019

08:15 AM

Hello. 

You redo the query steps in the power query editor in powerbi?

Im kind of new in this and im trying to stablish a connection to mysql. 

I´ll be waiting for an answer. 

Best Regards


Message 7 of 11

38,965 Views

Salvador

  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Report Inappropriate Content

‎09-11-2018

03:48 AM

Hello @Anonymous,

I’d say there was an error on one of the steps, perhaps it wasnt shown on the query editor, (you’d need to refresh in every single step), and there’s also the possibility that some data that wasnt being loaded in the query editor was causing the error (i.e, a  # when a numeric value is expected, i’ve suffered a couple of times by replacing # by empty spaces after setting the data type to numeric, even tough it might work in the query editor, when the full data set is loaded it will give an error)


Message 5 of 11

41,068 Views

Please login or click SIGN UP FOR FREE to create your PowerBIUG account to join this user group.

Dataset Refresh Failure

  • 1. 
    Dataset Refresh Failure

    Posted Nov 30, 2018 02:40 PM

    ​My Power BI report data set refresh fails. I have copied below the error msg. Does anyone has similar issue? and also appreciate your comments, input and any resolutions.

    Last refresh failed: Fri Nov 30 2018 10:16:15 GMT-0800 (Pacific Standard Time)
    Cannot connect to the mashup data source. See error details for more information.Hide details
    Underlying error code: -2147467259 Table: Invoice Totals by Cust and Product.
    Underlying error message: MySQL: Fatal error encountered during data read.
    DM_ErrorDetailNameCode_UnderlyingHResult: -2147467259
    Microsoft.Data.Mashup.ValueError.DataSourceKind: MySql
    Microsoft.Data.Mashup.ValueError.DataSourcePath: 00.00.00.000;xxyyss
    Microsoft.Data.Mashup.ValueError.ErrorCode: -2147467259
    Microsoft.Data.Mashup.ValueError.Message: Fatal error encountered during data read.
    Microsoft.Data.Mashup.ValueError.Reason: DataSource.Error

    ——————————
    Brian Gunns
    97477
    ofd
    SPRINGFIELD OR
    ——————————

  • 2. 
    RE: Dataset Refresh Failure

    Posted Dec 03, 2018 08:09 AM

    ​Its just from my own experience of this error, but its probably either credentials in the Gateway being out of date (password expired?), the credentials don’t allow access to one or more data sources (account locked?) or possibly that there is a data source the Gateway can no longer access (changed file location, permissions etc.).

    ——————————
    Simon Hill
    Manager
    TTX Company
    Solihull
    ——————————

  • 3. 
    RE: Dataset Refresh Failure

    Posted Dec 04, 2018 08:47 AM

    Definitely not a permission issue.  It throws various errors regarding the query and the underlying data.
    It turned out if I pushed the filter after the first merge (where it couldn’t convert the table to a table) it worked while still being part of the native query.  All subsequent merge efforts do not use query folding for various reasons.  In any case once I figured out the best «order of steps» in Power Query it now loads.  Albeit ridiculously slow, but it loads.  Ideally, I would prefer to just use a custom query on this one and pass in the IN clause as a parameter (Value.NativeQuery) or using string concatenation prior to using it.  This method works fine in desktop, but fails on the server having nothing to do with credentials.

    ——————————
    Daniel Davis
    Business Intelligence Developer
    TPX Communications
    Portland, ME
    ——————————

  • 4. 
    RE: Dataset Refresh Failure

    Posted Feb 16, 2021 05:36 AM

    Hello Daniel

    Found your posting this morning. I half understand your workaround. When you get a moment, appreciate your unpacking ‘ pushed the filter after the first merge’.

    Thanks

    John

    ——————————
    John Martin
    ——————————

147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

1

11.05.2018, 16:20. Показов 4904. Ответов 13


Привет всем!

Моя программа работает с удаленной базой MySQL. Всё работает чудно, но после нескольких минут простоя программы (производится только обновление таблиц с сервера с интервалом в 5 секунд) при записи новой строки в таблицу MySQL выдает ошибку «Fatal error encountered during command execution«. Подскажите, пожалуйста, от чего это может случаться и как это исправить?

Спасибо!



0



Администратор

Эксперт .NET

15251 / 12289 / 4905

Регистрация: 17.03.2014

Сообщений: 24,888

Записей в блоге: 1

11.05.2018, 18:08

2

Vinemax, полный текст исключения смотрел? С соединением как работа идет — открывается каждый раз новое или все время одно?



2



Vinemax

147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

11.05.2018, 18:23

 [ТС]

3

OwenGlendower, всё время одно. Текст исключения весь не видел, бо у меня обработчик ошибок стоит. Я тут нагуглил, что есть такое свойство, как CommanTimeout, которое по умолчанию установлено в 30 (видимо, секунд). Устанавливаю его целенаправленно в 3600 и вот сейчас проверил и опять эта же ошибка после некоторого простоя. Код операции добавления строки в таблицу на VB у меня такой:

VB.NET
1
2
3
4
5
            Dim command As New MySqlCommand("INSERT INTO ...", connection)
 
            command.CommandTimeout = 3600
 
            command.ExecuteNonQuery()

…подключение connection всё время открыто, но вот command у меня локальная в процедуре. Может быть её сделать глобальной для всего класса и сразу установить ей глобально CommandTimeout ?



0



Администратор

Эксперт .NET

15251 / 12289 / 4905

Регистрация: 17.03.2014

Сообщений: 24,888

Записей в блоге: 1

11.05.2018, 18:27

4

Цитата
Сообщение от Vinemax
Посмотреть сообщение

Текст исключения весь не видел, бо у меня обработчик ошибок стоит.

Не вижу тут связи. Прежде чем что-то делать нужно точно знать что происходит. Получи полный текст исключения прежде чем двигаться дальше.

Цитата
Сообщение от Vinemax
Посмотреть сообщение

Может быть её сделать глобальной для всего класса и сразу установить ей глобально CommandTimeout ?

Не надо.

Цитата
Сообщение от Vinemax
Посмотреть сообщение

подключение connection всё время открыто

Возможно поможет открытие и закрытие соединение для каждой команды. Создали соединение, открыли, выполнили команду и закрыли соединение.



2



147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

11.05.2018, 18:43

 [ТС]

5

Цитата
Сообщение от OwenGlendower
Посмотреть сообщение

Создали соединение, открыли, выполнили команду и закрыли соединение.

Видимо, так и сделаю, если иначе не решу вопрос. Сейчас запустил без обработчика ошибок, подожду немного, чтобы увидеть весь текст исключения…

Добавлено через 12 минут
MySql.Data.MySqlClient.MySqlException: «Fatal error encountered during command execution.»

1) SocketException: Удаленный хост принудительно разорвал существующее подключение

2) IOException: Не удается прочитать данные из транспортного соединения: Удаленный хост принудительно разорвал существующее подключение.

3) MySqlException: Reading from the stream has failed.

4) MySqlException: Fatal error encountered attempting to read the resultset.

Это всё одна ошибка.



0



Администратор

Эксперт .NET

15251 / 12289 / 4905

Регистрация: 17.03.2014

Сообщений: 24,888

Записей в блоге: 1

11.05.2018, 18:53

6

Лучший ответ Сообщение было отмечено Yury Komar как решение

Решение

Vinemax, как и предполагалось виновато соединение которое внезапно оказывается закрытым. Попробуй открывать и закрывать его явно каждый раз.



2



147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

11.05.2018, 18:55

 [ТС]

7

Да вот не хотелось бы закрывать и открывать заново, это же всё время, особенно при медленном интернете



0



Администратор

Эксперт .NET

15251 / 12289 / 4905

Регистрация: 17.03.2014

Сообщений: 24,888

Записей в блоге: 1

11.05.2018, 18:56

8

Vinemax, у соединения две стороны. Одна сторона может закрыть соединение не уведомляя другую. В данном случае так поступает сервер MySql.



2



147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

11.05.2018, 19:30

 [ТС]

9

Лучший ответ Сообщение было отмечено Yury Komar как решение

Решение

OwenGlendower, сделал connection.Ping с интервалом в 5 секунд и проблема пропала. Только вот вопрос, а можно ли так часто и много пинговать, админов сайта это не насторожит, не заблокируют?



1



Администратор

Эксперт .NET

15251 / 12289 / 4905

Регистрация: 17.03.2014

Сообщений: 24,888

Записей в блоге: 1

11.05.2018, 20:05

10

Vinemax, без понятия. Время покажет.



1



147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

11.05.2018, 20:24

 [ТС]

11

OwenGlendower, спасибо!



0



Модератор

Эксперт .NET

3861 / 3184 / 479

Регистрация: 27.01.2014

Сообщений: 5,809

12.05.2018, 04:21

12

Vinemax, а зачем каждые 5 секунд делать пинг, ведь это гораздо дольше чем открывать и закрывать соединение?



1



147 / 115 / 10

Регистрация: 12.09.2011

Сообщений: 785

13.05.2018, 02:15

 [ТС]

13

Yury Komar, ну у меня происходит так… В фоновом процессе BackgroundWorker’а каждые пять секунд обновляются все таблицы программы, а точнее измененные строки всех таблиц. При запуске BackgroundWorker’а пятисекундный таймер отключается, а при завершении обновления всех таблиц опять включается, то есть через пять секунд из процедуры Tick таймера BackgroundWorker опять запускается. Ну вот в этот момент перед запуском BackgroundWorker’а я и делаю пинг. И вот практика на примере очень медленного Интернета показала, что пинг происходит очень быстро, а вот новое подключение идет две — три секунды. Дело в том, что MySqlConnection.Ping возвращает только True или False, то есть не дает всей инфы, отчего, видимо, быстро и срабатывает. Здесь получается суть не конкретно в пинге, а в том, чтобы connection хоть чем-то занять, дабы оно не разъединялось.



1



Модератор

Эксперт .NET

3861 / 3184 / 479

Регистрация: 27.01.2014

Сообщений: 5,809

13.05.2018, 02:42

14

Vinemax, понятно. Ну надеюсь будет работать без сюрпризов.



1



Понравилась статья? Поделить с друзьями:
  • Power bi load was cancelled by an error in loading a previous table
  • Power bi error 2147467259
  • Postgresql error column of relation does not exist
  • Postgresql error codes
  • Postgresql error binding the test network socket 10013