RStudio Fatal Error Using MySQL Connector ODBC 9.1 Driver

I recently upgraded the ODBC driver that I am using to connect to an AWS RDS MySQL DB in RStudio. I upgraded to the mysql-connector-odbc-9.1.0 from 8.4. After doing so RStudio exits with a fatal error as soon as the code attempts to connect via ODBC to the database.

"R Session Aborted
R encountered a fata error
The session was terminated"

In a standalone R session outside of RStudio the issue does not occur so I lean towards an issue affecting RStudio only.

If I revert back to any of the 8.x versions the issue goes away and everything works as expected. I am using R version 4.4.0 and RStudio 2024.09.0 Build 375. Windows Server 2022 operating system which is up to date with updates.

Any help is appreciated.
Thanks.

Confirming same issue, Rstudio 2024.09.1+394 with R 4.2.2, connection works fine in base R but R session in Rstudio crashes upon calling odbcConnect(). Same on a colleague's system. Issue does not occur with mysql connector/odbc 9.0.0.

Hi @hslagter,

I have more or less given up working on this and am going to wait until 9.2 hopefully resolves the issue. I did find this: https://forums.mysql.com/read.php?37,730447,730502#msg-730502

They recommend updating VC++ to version 14.40. Apparently this has worked for a number of folks. It did not work for me and the R issue we are having but could be worth a shot if you want it.

Hi @mdubs91,

Thanks for the link, afraid this didn't work on my machine either.
Right now I'm using version 9.0.0 from the archives at mysql.com, which works normally.