Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RMariaDB failed to connect to db #264

Closed
EllyJung opened this issue Mar 17, 2022 · 1 comment
Closed

RMariaDB failed to connect to db #264

EllyJung opened this issue Mar 17, 2022 · 1 comment

Comments

@EllyJung
Copy link

Hi I am using Rstudio on my MacBook, I connected MariaDB server by terminal and it connected well, but when i try to run a code below, it does not work.

# set file_path ---------------------------------------------------------------
file_path <- glue("../Users/xxxxxxx/Desktop:/{list.files('../Users/xxxxxxxx/Desktop:/', pattern = 'xxxxxxxxx')}/")

args <- read.delim(paste0(file_path, "con_names.txt"), sep = ",", header = F)
getwd()
db_input <- args$V1
user_input <- args$V3
pw_input <- args$V4
host_input <- args$V5

con <- dbConnect(MySQL(),
                 dbname = db_input, 
                 user = user_input,
                 password = pw_input,
                 host = host_input)

but console shows me this error:

Error in .local(drv, ...) : 
  Failed to connect to database: Error: Access denied for user 'root'@'localhost'

By the way, I installed MariaDB by home-brew also tried change my_native_password. but still did not work.
Please advise anything if there is any solution for this. Thanks!

@krlmlr
Copy link
Member

krlmlr commented May 14, 2022

Thanks, this fell through the cracks. Have you managed to connect from R? What package did you end up using?

@krlmlr krlmlr closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants