Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb如何做安全认证 #2

Open
toby20130333 opened this issue Jul 6, 2015 · 0 comments
Open

mongodb如何做安全认证 #2

toby20130333 opened this issue Jul 6, 2015 · 0 comments

Comments

@toby20130333
Copy link

var configdb = 'mongodb://username:password@127.0.0.1:27017/nodeclub',
mongoose.connect(configdb, function (err) {
  if (err) {
    console.error('connect to %s error: ', config.db, err.message);
    process.exit(1);
  }
});

上面是使用mongoose进行链接,发现认证总是失败,而不输入用户名和密码倒是可以正常连接
,想问下大神,有木有这样的例子可以参考呢?
我参考了
参考图

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant