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 RMySQL
to the Imports field of your DESCRIPTION
file. You can do that with usethis::use_package("RMySQL")
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With