使用RMySQL,R和MySQL连接到数据库 [英] connecting to database using RMySQL, R and MySQL

查看:237
本文介绍了使用RMySQL,R和MySQL连接到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试从R连接到我的数据库。当我从shell(使用unix)启动服务器,我必须传递--ssl-ca = myfile。如何使用dbConnect函数传递此标志?感谢。

I am trying to connect to my database from R. When I start the server from the shell (using unix), i have to pass the --ssl-ca=myfile. How do I pass this flag using the dbConnect function? Thanks.

推荐答案

问题解决。在某个目录中创建一个文件,并在该文件中写入以下内容:

Problem solved. Create a file in some directory and in that file write the following:

[client]
password=yourpass
username=yourusername
...
ssl-ca=yourcertspath

然后将文件名传递给 dbConnect

这篇关于使用RMySQL,R和MySQL连接到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆