thinkphp5 mongodb Authentication failed 解决办法
Bulk write failed due to previous MongoDB\Driver\Exception\AuthenticationException: Authentication failed.
原因是
/vendor/topthink/think-mongo/src/Connection.php
文件中connect
方法(大概189行左右)在拼接dns的时候缺少参数
$config['dsn'] = 'mongodb://' . ($config['username'] ? "{
$config['username'