我创建了一个使用我的电脑中存储的数据完美运行的应用。但是,当我通过shinyapps.io发布应用程序时,它不起作用。我在下面的链接中找到了一些可能的解决方案
https://shiny.rstudio.com/articles/persistent-data-storage.html
由于我的电脑权限,我决定使用MongoDB选项,但在尝试连接数据库时,我总是遇到同样的错误。
*options(mongodb = list(
"host" = "ds225010.mlab.com:25010/pmsanchezb", # will be like: ds131041.mlab.com:31041
"username" = "pmsanchezb",
"password" = "#############"
))
db_name <- "pmsanchezb" # whatever you called the database when you set it up
db <- mongo(collection = "data",
url = sprintf("mongodb://<dbuser>:<dbpassword>@ds225010.mlab.com:25010/pmsanchezb",
options()$mongodb$username,
options()$mongodb$password,
options()$mongodb$host,
db_name))*
我已多次检查过密码和其他选项,但似乎总是出现同样的错误。
错误:身份验证失败。
如果有人有任何想法或建议会导致错误,我将不胜感激。上面代码中显示的值直接从Mlab中创建的数据库中复制。