Error: nanodbc/nanodbc.cpp:1021: 00000: [

Viewed 394

I have been trying to connect to my SQL that I am trying to create. I recently downloaded MySQL, the workbench, the connector ODBC, and the ODBC Manager, but I can't find the solution to solve the error for the connection. Do I need to download anything else? I can't find a solution on internet or youtube for Mac.

packages_required = c("quantmod", "RSQLite", "data.table", "lubridate", "pbapply", "DBI")
install.packages(packages_required)

library("quantmod")
library("RSQLite")
library("data.table")
library("lubridate")
library("pbapply")
library("odbc")

PASS <- new.env()
assign("pwd","My Password",envir=PASS)

library("DBI")
con <- dbConnect(odbc(), Driver = "/usr/local/mysql-connector-odbc-8.0.28-macos11-x86-64bit/lib/libmyodbc8w.so", 
                 Server = "localhost", Database = "data", UID = "root", PWD = PASS$pwd, 
                 Port = 3306)
-----------------------------------------------------------------------------------------

> con <- dbConnect(odbc(), Driver = "/usr/local/mysql-connector-odbc-8.0.28-macos11-x86-64bit/lib/libmyodbc8w.so", 
+                  Server = "localhost", Database = "data", UID = "root", PWD = PASS$pwd, 
+                  Port = 3306)
Error: nanodbc/nanodbc.cpp:1021: 00000: [ 
> 

Thank you

0 Answers
Related