I am getting an error message " error in evaluating the argument 'drv' in selecting a method for function 'dbConnect': could not find function "MySQL""
Here is the part of the code:
library(DBI)
conn <- dbConnect( drv = RMySQL::MySQL(), dbname = "xxx", host = "xxx", username = "xxx", password = "new_password")
dbGetQuery(conn, "SELECT * FROM tech LIMIT 1;")
dbDisconnect(conn)
If you're using a script in an interactive session, call
library(RMySQL)to load the package.If you get this error while developing a package, add
RMySQLto the Imports field of yourDESCRIPTIONfile. You can do that withusethis::use_package("RMySQL").