We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我用的是ThinkPHP5.0.22. 我在extra目录下建立了一个文件叫mongo.php内容如下
mongo.php
return [ 'type' => '\think\mongo\Connection', 'hostname' => '1.2.3.4', 'database' => 'fa_brand', 'username' => 'mongodb', 'password' => 'pre-mongodb', 'hostport' => '2000', 'prefix' => '', 'pk_convert_id' => true, 'debug' => false, ];
这样配置了以后,查询数据报
not authorized on fa_brand to execute command { find: "brand_user", filter: {}, projection: {}, limit: 0 }
但是我使用mongodb这个用户通过命令行是可以查询出来的。
最后我把username这个用户换成了超级管理员,却可以查询出来。 很奇怪啊 。
username
The text was updated successfully, but these errors were encountered:
好吧。最终测试了是因为用了mongodb这个特殊的用户名。我让dba重新给我开了个别的用户名发现可以了。 这也是个坑,希望后面的同学可以看到这个issue。不要踩坑了。
mongodb
补充: 因为这个特殊的用户名,java同事那边一直在用,没什么问题。所以dba直接让我们一起用的。
Sorry, something went wrong.
No branches or pull requests
我用的是ThinkPHP5.0.22.
我在extra目录下建立了一个文件叫
mongo.php
内容如下这样配置了以后,查询数据报
但是我使用mongodb这个用户通过命令行是可以查询出来的。
最后我把
username
这个用户换成了超级管理员,却可以查询出来。 很奇怪啊 。The text was updated successfully, but these errors were encountered: