I want to access MySQL database in R studio but when i try the code below, it throws up this error:
Error: nanodbc/nanodbc.cpp:1021: 00000: [unixODBC][Driver Manager]Can't open lib 'MySQL ODBC 8.0 ANZI Driver' : file not found
Code:
library(RODBC)
conn3 <- DBI::dbConnect(odbc :: odbc(),
Driver = "MySQL ODBC 8.0 ANZI Driver",
Server = "localhost",
user = "root",
password = "jaymo247365",
Database = "firstproject",
trusted_connection = "yes",
port = 3306
)
How do i solve this?