r-dbi / RMariaDB

An R interface to MariaDB
https://rmariadb.r-dbi.org
Other
129 stars 40 forks source link

RMariaDB() not working #314

Closed kwakuduahc1 closed 6 months ago

kwakuduahc1 commented 11 months ago

The group argument for the RMariaDB() functions seems to work no more.

I have tried on 2 different Ubuntu 22 servers and it does not seem to read from the .my.cnf file located in the user directory It works as expected if I provide a username and a password. The error seems it tries to connect with the username I used to log into RStudio despite the username for MySQL being different.

It worked months ago and I cannot recollected the exact time it stopped working.

DBI::dbConnect(RMariaDB::MariaDB(), group = "rs-dbi")
#> Error: Failed to connect: Access denied for user 'username'@'localhost' (using password: NO)

Where username is the ID used to access the RStudio Server

Created on 2023-10-26 with reprex v2.0.2

Where the __rs_dbi file is located in ~/.my.cnf__ and reads

[rs-dbi]
database="my_db"
user="my_username"
password="my_password"
krlmlr commented 11 months ago

Thanks. Is this fixed by https://github.com/r-dbi/RMariaDB/pull/306, already on the main branch?

kwakuduahc1 commented 11 months ago

No, I am not on the main branch, I installed from CRAN.

Then again, is the parameter name changing from group to groups?

Thanks.

krlmlr commented 11 months ago

AFAICT it's been groups for a while now, you can use group thanks to R's partial matching.

krlmlr commented 6 months ago

group and groups will both work in the upcoming CRAN version, and should already work even with the current version. Can you confirm?

kwakuduahc1 commented 6 months ago

On version 1.3..1, both params work.

krlmlr commented 6 months ago

Thanks for confirming!