This article covers the different ways you can connect to the SingleStore database using R script — particularly using RMySQL and RJDBC libraries.
In this article, I will be describing the different ways you can connect to the SingleStore database using R. In particular, we will be discussing the RMySQL and RJDBC libraries.
One interesting fact about SingleStore is although its architecture has nothing to do with the open source MySQL database, SingleStore makes it fairly easy to connect to the SingleStore databases using MySQL database connectivity drivers. In short, you can connect to the SingleStore database using the same drivers and protocols as you do for MySQL.
Although this document has been written to work both on cluster-in-box and Distributed mode, the success of the connection will depend on the property of the server to accept connection from outside its environment — and of course, the correct connection parameters of the code.
Connecting using RMySQL library :
Connecting using the RJDBC library:
There are few other ways to connect to the SingleStoreDB On-Premises using R, a common method on a windows machine would be the ODBC. If you are looking for the ODBC mode, just create the ODBC variable on your machine and connect using the DSN.
If you find yourself stuck on any steps, simply check if the correct connection parameters and case has been used. You can also post issues and other methods in the SingleStore forum!