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

Failure to use ~/.my.cnf beginning with v0.10.14 #222

Open
EricGoldsmith opened this issue Jul 7, 2018 · 3 comments
Open

Failure to use ~/.my.cnf beginning with v0.10.14 #222

EricGoldsmith opened this issue Jul 7, 2018 · 3 comments

Comments

@EricGoldsmith
Copy link

EricGoldsmith commented Jul 7, 2018

Would appreciate input from those who are wise in the ways of the use of ~/.my.cnf.

Have been using binary distributions of RMySQL on OSX for years, making use of ~/.my.cnf without issue.

Beginning with v0.10.14, DB connections would fail like:

Error in .local(drv, ...) : 
  Failed to connect to database: Error: Access denied for user 'ericgoldsmith'@'10.199.0.56' (using password: NO) 

Took a while to realize that it was no longer using the info from ~/.my.cnf.

I re-installed RMySQL, from source this time (install.packages("RMySQL", type = "source")), having already had mysql installed via homebrew, and all was back to normal.

Same thing happened when RMySQL v0.10.15 was released. Installed from source, and all was good.

In researching this, I came upon this doc, while for MariaDB, discusses the myriad of places config files can live. But, a comment at the bottom says:

Be aware that the paths listed above are compile-time options, and may be different in your version, if you download and built using a package manager. …
In my case, I had installed a Mac OS package from this site for an earlier version, which put everything where expected. Then MariaDB stopped supporting Mac OS binaries, and so I used homebrew to install 10.1.8, which then looked for my.cnf in /usr/local/etc/my.cnf.d/ . I spent HOURS trying to figure out why the variables I changed didn't happen!

I suspect something like this is the root of the original issue - config file location info was changed with the v0.10.14 binary - and installing from source restored prior behavior. But, I can't quite connect all the dots to say that definitively.

Any assistance would be appreciated.

@krlmlr
Copy link
Member

krlmlr commented Aug 26, 2018

Can you please try the default.file argument to dbConnect() ? Please be sure to use absolute paths and not "~", you can convert with path.expand() .

@EricGoldsmith
Copy link
Author

No change.

@amstilp
Copy link

amstilp commented Sep 14, 2018

I'm having a similar problem. I'm using MacOS 10.12.6, and installed mysql using macports. dbConnect() works when I compile RMySQL from source, but I get a connection error when I install the binary. Including the default.file argument does not help.

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

3 participants