필터 지우기
필터 지우기

Why does matlab crash when I try to query from my database(MySql)?

조회 수: 3 (최근 30일)
After updating MySQL (ver.: 8.0.12) MATLAB crashes every time I try to query from the database (MATLAB has encountered an internal problem and needs to close.). I can successfully connection to the DB, but it crashes when I ty to query. I only encounter the problem when trying to query from the DB, otherwise MATLAB seems to run as normal. I encounter the same problem in 2017b and 2018a.
  댓글 수: 2
Geoff Hayes
Geoff Hayes 2018년 8월 15일
Öyvind - what is your query? What do you expect it to return? (i.e. how many records are querying for?)
Öyvind Karlsson
Öyvind Karlsson 2018년 8월 15일
I have used the following query, which should return approximately 360 rows/8 columns:
SELECT days.user_id, days.year, days.period, attributes as sickday
FROM days
LEFT JOIN day_results ON days.id = day_results.day_id
LEFT JOIN workout_parts ON day_results.workout_id = workout_parts.workout_id
LEFT JOIN parts ON workout_parts.part_id = parts.id
WHERE (days.user_id = 245 or days.user_id = 64 or days.user_id = 81 or days.user_id = 512 or days.user_id = 244 or days.user_id = 154 or days.user_id = 153 or days.user_id = 449 or days.user_id = 432 or days.user_id = 255 or days.user_id = 210 or days.user_id = 212 or days.user_id = 697 or days.user_id = 730 or days.user_id = 1064 or days.user_id = 553 or days.user_id = 169 or days.user_id = 476 or days.user_id = 172 or days.user_id = 881 or days.user_id = 70 or days.user_id = 167)
AND (days.year < 2018 and days.year >= 2012)
GROUP BY days.id
ORDER BY days.year, days.period, days.week, days.day;
However, I have also tried much simpler queries and I encounter the same problem;

댓글을 달려면 로그인하십시오.

채택된 답변

Kojiro Saito
Kojiro Saito 2018년 8월 20일
I think this is the same issue as described in this answer. It might be related to MySQL ODBC 8.x drivers.
There are two workaround.
1. Use other MySQL ODBC Connector versions than 8.x (for example, MySQL ODBC 5.3 )
2. Use JDBC drivers instead of ODBC.
I'm using MySQL JDBC driver 8.0.11 with MATLAB R2018a, it works.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Database Toolbox에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by