You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(RMySQL)
con <- dbConnect(MySQL(),user='root',password='system')
Error in .local(drv, ...) :
Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Just ran into this when a homebrew upgrade installed mysql v8.0.11. FWIW, here's what I did to get things working again on my OSX system:
In RStudio, remove the RMySQL package: remove.packages(“RMySQL")
From a command prompt, remove mysql: brew uninstall mysql
From a command prompt, install the old version, and keep it from being upgraded in the future: brew install mysql@5.7 brew link --force mysql@5.7 brew pin mysql@5.7
Back in RStudio, install RMySQL from source: install.packages("RMySQL", type = "source")
I updated MySQL to the newest version 8.0.11, but when I tried to connect R to MySQL, it's not working.
Code:
library(RMySQL)
con <- dbConnect(MySQL(), user="hello", password="hi", dbname = "webscrape", host="xx.xxx.xxx.xxx", port=xxxx)
Error:
Error in .local(drv, ...) :
Failed to connect to database: Error: Can't initialize character set unknown (path: compiled_in)
The text was updated successfully, but these errors were encountered: