I think it might be hard for people to help with this problem without some more information. Error messages are often difficult to interpret without seeing them in the context of the code that produced them. It will help a lot if you can at least post the exact code that you ran (including your library() calls) which resulted in the error message.
Even better...
People here often ask posters to go one step further, and create a self-contained reproducible example using the tools in the reprex package. It's difficult to make database connection problems truly self-contained, but any effort you can make in that direction would be very helpful. A major benefit of the reprex package is that it produces a formatted chunk of both the code and any output, including error messages, all ready for posting, which makes it really easy for others to understand what's going on.