简体   繁体   中英

RMySQL or RMariaDB to connect to a MySQL 8 DB?

Perhaps it's a silly question, but at least for me is not that obvious. Perhaps for the naming.

I'm trying to figure out what is the correct package I'm need to use to connect my R code to a MySQL database.

I've read in the RMySQL package that:

NOTE: this package is being phased out in favor of the new RMariaDB package.

So in other words, from now on do I need to use RMariaDB package even if I'm connecting to MySQL or MySQL support is going to be dropped at some point since the databases are diverging a little bit on each version.

I specially ask in the context of MySQL 8.

Thanks!

Yes, you should use RMariaDB instead of RMySQL.

Both RMariaDB and RMySQL are using the same database driver, the MariaDB Connector/C client library for client/server communication:

  • MariaDB Connector/C supports all MySQL and MariaDB specific authentication methods, so connecting to a MySQL 8.0 database server shouldn't be a problem.

  • Beside the X-Protocol, which isn't used in R, MariaDB Connector/C also supports all MySQL specific api features.

  • RMariaDB supports text and binary protocol for client/server communication. Differences between MySQL and MariaDB binary protocol are handled in MariaDB Connector/C, text protocol is still the same.

  • RMariaDB will be a replacement for RMySQL, so in near future you will not get bug or security fixes for RMySQL anymore.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM