-
Notifications
You must be signed in to change notification settings - Fork 40
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 unable to connect with .mylogin.cnf #156
Comments
Thanks. Generally, passing I see two differences in the
Can you confirm that this problem occurs independently of the location of the |
Hi krlmlr I have moved the location of the .mylogin.cnf to other directories but the result is the same error. In terms of recording the settings. I can only go by what mysql_config_editor provides as below.
These are the settings I can enter to create the .mylogin.cnf and there is not the option to specify a database name. As below, no matter what order you write your settings in terminal, mysql_config_editor sets them in the order it wishes. After -p is a prompt for password, so -p has to be last.
The resulting .mylogin.cnf is then encrypted. Adding database=projects to the encrypted file does not fix the problem. In terminal, running I'm slowly resigning the fact it might not be possible, but if there is a solution, I'm all ears. |
I was not aware of the obfuscation (=really bad encryption) of From https://mariadb.com/kb/en/configuring-mariadb-connectorc-with-option-files/#option-groups:
Can you use a |
I admit I don't know how this should be solved. It seems like upstream has left you up shit creek by not supporting this. But I do think the current situation is not very good. |
I guess we need to document the behavior at the very least. Maybe add a section about configuration files and securing passwords to Secure passwords
|
@krlmlr By the way, I wrote a library for R which is capable of decrypting a .mylogin.cnf file. Users who are dead-set on using password obfuscation may find it helpful. |
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).
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. |
I'm developing a script in RStudio which connects to local MySQL Server using the R package RMariaDB (not RMySQL - for other reasons though the outcome is the same).
I can both connect via storing the password in the script like:
or by way of a .my.cnf using credentials:
and R code as
The above work just fine but if I want to connect with .mylogin.cnf created in mysql_config_editor and looks like
with the R script code like
I get the error
I have tried various combinations of arguments expressing null or otherwise. And have entered my password with mysql_config_editor with double quotes around it. In https://cran.r-project.org/web/packages/RMariaDB/RMariaDB.pdf it specifies the use of .mylogin.cnf but I cannot find a way to make it work. Does anyone know a solution to this or has the same issue? Thanks
The text was updated successfully, but these errors were encountered: