Skip to content

~ not resolved correctly in default.file argument #197

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

Closed
twentytitus opened this issue Jan 7, 2021 · 3 comments · Fixed by #199 or #216
Closed

~ not resolved correctly in default.file argument #197

twentytitus opened this issue Jan 7, 2021 · 3 comments · Fixed by #199 or #216
Milestone

Comments

@twentytitus
Copy link
Contributor

twentytitus commented Jan 7, 2021

Hi,

on Windows 10 with R 4.0.2, after updating from RMariaDB 1.0.8 to 1.0.11, the following fails:

library(RMariaDB)
dbConnect(MariaDB(), groups = "MYSQL", default.file = "~/.my.cnf")

The error message is Failed to connect: Can't connect to MySQL server on 'localhost' (10061).

However, replacing the ~ as in

dbConnect(MariaDB(), groups = "MYSQL", default.file = file.path(Sys.getenv("R_USER"), ".my.cnf"))

works just fine. Any ideas why this could happen? The issue was not present before the package update. Edit: It also seems to work with version 1.0.10.

Many thanks in advance!

@krlmlr
Copy link
Member

krlmlr commented Jan 7, 2021

Thanks. On Windows, the Connector/C version was upgraded from 2.3.7 to 3.1.11, perhaps the change is related.

We could call normalizePath() on the R side to restore the old behavior. Would you like to submit a pull request?

@twentytitus
Copy link
Contributor Author

I can give it a try next week!

@krlmlr krlmlr added this to the 1.1.2 milestone Aug 24, 2021
krlmlr added a commit that referenced this issue Aug 29, 2021
- `dbConnect()` normalizes all input paths (#197, @twentytitus).
krlmlr added a commit that referenced this issue Oct 31, 2021
RMariaDB 1.1.2

- RMariaDB is now licensed under the MIT license (#213).

- `dbConnect()` normalizes all input paths (#197, @twentytitus).
- `dbDataType()` returns `TIME(6)` for `difftime`, and `DATETIME(6)` for `POSIXt` columns, to create columns with microsecond precision by default (#214).

- Now referring to the `libmariadb-dev` Debian/Ubuntu package in documentation and configuration scripts (#219).
- `?dbConnect` gains a section on secure passwords and the `.mylogin.cnf` file (#156).

- Test MySQL and MariaDB Server and client libraries in all combinations on GitHub Actions (#224).

- The `configure` script now queries the `RMARIADB_FORCE_MARIADBCONFIG` and `RMARIADB_FORCE_MYSQLCONFIG` environment variables to force use of `mariadb_config` or `mysql_config`, respectively (#218).
@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants