View source: R/dbio_credentials.R
saveCredentials | R Documentation |
manage database credentials for for different hosts and for different users within a host.
saveCredentials(user, pwd, host, db, path) credentialsExist(host, path) removeCredentials(path) getCredentials(user, db, host, path, show = FALSE) credentialsPath()
user |
user |
pwd |
pwd |
host |
host |
db |
db |
path |
when missing s detected by credentialsPath () |
show |
default to FALSE |
saveCredentials saves the specified credentials to a default location unless you specify a custom path. This information can be used by dbcon
and dbq
to connect to and query the database.
Currently, you can store credentials for different hosts and for different users within a host.
removeCredentials
removes the credentials file.
credentialsExist checks if credentials are saved for a specified host.
credentialsExist
,removeCredentials
, and saveCredentials
return TRUE
if successful
Credentials are stored in plain text in a hidden file in your home directory.
dbcon
,dbq
saveCredentials(user = 'user_a', pwd = 'pwd_a', host = '127.0.0.1') saveCredentials('user_b', 'pass_b', host = '127.0.0.1') removeCredentials()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.