Skip to content
Prev 12862 / 15274 Next

'Defaults' removed from CRAN? (2014-10-03)

On Wed, Oct 8, 2014 at 9:27 AM, Daniel Cegie?ka
<daniel.cegielka at gmail.com> wrote:
For getSymbols.MySQL only:

WRT to coding I'm certainly not the best person to do it but if
getSymbols.MySQL ,
or even just some other support function, read the .my.cnf file then
we'd probably
have a more standard long term solution with (slightly) better
security. I'm coding
up a simple function to do that for my simple needs. It doesn't seem
like it should
be an overly difficult task. The basic file format is:

mark at c2RAID6 ~ $ cat .my.cnf
[client]
user = mark
password = MyTempPassword
host = localhost

mark at c2RAID6 ~ $

so finding the [client] group and then gathering user & password would be
enough to handle the security part of the MySQL access.
function (Symbols, env, return.class = "xts", db.fields = c("date",
    "o", "h", "l", "c", "v", "a"), field.names = NULL, user = NULL,
    password = NULL, dbname = NULL, host = "localhost", port = 3306,
    ...)
NULL
If the function was called from within getSymbols.MySQL then the
user & password would remain private and be destroyed when exiting
getSymbols.MySQL which would yield better security. (I think...) The user
could still pass in the values if he didn't want to do this on every call.

I need to learn to handle strings better... :-)

- Mark