Rstudio database connection Pane

I am able to connect with mysql database , but how can I use Rstudio as a sql editor ( how to add connection Rstudio database connection Pane)

Paste your parameters this way

SERVER=courses.csrrinzqubik.us-east-1.rds.amazonaws.com;DATABASE=tweater;PORT=3306;UID=student;PWD=datacamp;
1 Like

Thanks a lot, it works. and how to do it with SQLite database ?

I'm not sure because I have never used the driver you have installed for SQLite, but you have to follow the same logic, google the correct parameter names for your specific driver.

Rsqlite uses DBI and the rstudio connection contract is sill something missing. See


I think this is why the connection pane is missing.

You may be able to have one if you connect using odbc driver directly
https://db.rstudio.com/best-practices/drivers/
And using a connection string to connect.

I am not able to connect sqlite with odbc. I did install some sqlite odbc driver already

This works for me, but I'm on linux

library(odbc)
con <- dbConnect(odbc::odbc(),
                 .connection_string = "Driver={SQLite};database = chinook.db",
                 timeout = 10)
1 Like

I am on window. does not work..

SQLite connect sucessful with:

library(odbc)
library(DBI)
con <- dbConnect(odbc::odbc(), 
                 .connection_string = "Driver={SQLite3 ODBC Driver};Database=chinook.db", 
                 timeout = 10)
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.