-
Notifications
You must be signed in to change notification settings - Fork 111
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
host not read from .my.cnf #225
Comments
To be clear - The command above that does not work does work when using version 0.10.15. I was having trouble using install_version to get 0.10.15 installed so I ended up having a colleague send me the RMySQL director from the Library directory on their machine. Manually pasting this in my Library directory allowed me to get back to 0.10.15. In reading through recent commits to master, my guess is deleting this file may be causing the issue |
I am also having this problem. Input: Output: This line of code worked Thursday 1/24/2019 and did not work on Friday 1/25/2019 and the only thing I can think of is that I updated some package unwittingly that caused some change. I have tried to install the same configuration as my co-worker who is still able to run this line, but I cannot install RMySQL 0.10.11, the oldest I can install is RMySQL 0.10.14. Older than that I get an installation error: I am running: I have also tried this with I tried copying the raw of the mysql-connector-c.rb mentioned above and placing that file into the RMySQL directory but that didn't help. |
I just had this issue myself.
worked perfectly under 3.5.1 but when I upgraded R to 3.5.2, it stopped working! Calling dbConnect() with all the connection credentials as parameters works, so the problem seems to be with PARSING of .my.cnf when DBI and RMySQL are run within 3.5.2 |
@dan-reznik Are you using RMySQL 0.10.16? I've had no trouble with 0.10.15 and R 3.5.2 |
Yes, I am using 0.10.16. But I've also tried with 0.10.15 and had the same issue. |
i started to use RMariaDB and the issue went away |
I get the same error whether I use RMySQL or RMariaDB: |
try this con <- DBI::dbConnect(RMariaDB::MariaDB() # RMySQL::MySQL(),
,default.file = "./.my.cnf" # notice the ./
,group = "the group name in your file"
) |
Has anyone had luck resolving this issue for MySQL? Unfortunately, I can't migrate my data to MariaDB. |
u don' t need to migrate. keep db as mysql. just use the RMariaDB package
…On Tue, Feb 26, 2019 at 11:13 PM Greg Serapio-García < ***@***.***> wrote:
Has anyone had luck resolving this issue for MySQL? Unfortunately, I can't
migrate my data to MariaDB.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#225 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/APeqlvb7LoIJ880WnleeOxW7hVocxFFMks5vRem4gaJpZM4Z4OrJ>
.
|
Currently the .my.cnf file is in my top directory (~). The format of the file contents are: # Config file to connect to the remote DB So should I try: and would the group name be "client"? Or should I move my file to the working directory of my repo? |
@mstuart1 yes,group name is "client", but suggest change the name to avoid some possible troubles. |
I'm still getting an error for this:
|
Figured out that I can use rstudioapi to request password. Except it doesn't work with package testing or Rmarkdown knitting :/ |
I'm also trying to deal with this issue, and can't migrate to MariaDB due to it currently not handling JSON columns. Interestingly, RMySql successfully handles the .my.cnf in my development environment (Debian GNU/Linux 9 (stretch)), but it's failing in the Rstudio Connect server I'm trying to publish to ( Ubuntu 18.04.3 LTS)
R version 3.6.0 (2019-04-26) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached):
R version 3.6.0 (2019-04-26) Matrix products: default locale: attached base packages: other attached packages: loaded via a namespace (and not attached): |
I'm having an issue with the latest version of RMySQL. Specifically it appears that the host parameter in the .my.cnf file is not being read. I know the .my.cnf file is being read to get the user and password.
The following error for the first case below
Error in .local(drv, ...) : Failed to connect to database: Error: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Note the three cases below. The second case works when I specify the exact same hostname as in the .my.cnf. I have not needed to do this before installing 0.10.16. Is this behavior expected?
library(RMySQL)
tmpConn = dbConnect(RMySQL::MySQL(),group="auroraedsl", dbname="schemaname")
tmpConn = dbConnect(RMySQL::MySQL(),group="groupname", dbname="schemaname", host="hostname")
tmpConn = dbConnect(RMariaDB::MariaDB(),group="groupname", dbname="schemaname")
Session Info
`R version 3.5.2 (2018-12-20)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.2
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RMySQL_0.10.16 DBI_1.0.0
loaded via a namespace (and not attached):
[1] bit_1.1-14 compiler_3.5.2 hms_0.4.2 tools_3.5.2
[5] RMariaDB_1.0.6 yaml_2.2.0 Rcpp_1.0.0 bit64_0.9-7
[9] pkgconfig_2.0.2 rlang_0.3.1
The text was updated successfully, but these errors were encountered: