mongo的版本是3.2的,已经加了auth,在mongo上也去人auth可用,密码和用户名都没有问题。
'mongodb' => [
'class' => '\yii\mongodb\Connection',
'dsn' => 'mongodb://han:123123@127.0.0.1:27017/demo',
],
yii2中这样配置,然后报错
Failed to connect to: 127.0.0.1:27017: Authentication failed on database 'demo' with username 'han': auth failed
谁能解答一下???
'mongodb' => [
'class' => '\yii\mongodb\Connection',
'dsn' => 'mongodb://han:123123@127.0.0.1:27017/demo',
],
yii2中这样配置,然后报错
Failed to connect to: 127.0.0.1:27017: Authentication failed on database 'demo' with username 'han': auth failed
谁能解答一下???