mongo db不连接
我有使用各种DB的Drupal8应用程序。当我尝试通过提供用户名和密码与Mongo DB连接时,连接不会发生。我可以单独提及服务器地址与Mongo DB联系。
注意:MongoDB在我的服务器中配置了用户名和密码 我尝试了以下方法。
$this->connect_string = 'mongodb://user:password@serveraddress'; (not connecting)
$this->connect_string = 'mongodb://serveraddress'; (connecting)
#$this->connect_string = 'mongodb://user:password@serveraddress:27017/?authSource=dbname';(not connecting)
Drupal 8 PHP V-7.4
开发了自定义模块,以与Mongo DB连接,以显示新闻提要(Mongo DB中存储的新闻提要的信息)。
如何传递用户名&密码与Mongo DB连接? 在MongoDB服务器中找不到任何错误日志。
I have drupal8 application where I use various dbs. When i try to connect with mongo db by giving username and password, connection is not happening. I could connect with mongo db by mentioning server address alone.
note: mongodb is configured with username and password in my server
I tried below methods.
$this->connect_string = 'mongodb://user:password@serveraddress'; (not connecting)
$this->connect_string = 'mongodb://serveraddress'; (connecting)
#$this->connect_string = 'mongodb://user:password@serveraddress:27017/?authSource=dbname';(not connecting)
Php v-7.4, Drupal 8
developed custom module to connect with mongo db, to display news feed (news feed related information stored in mongo db).
how to pass user name & password to connect with mongo db?
Could not find any error logs in mongodb server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论