Use mongoose to connect to the specified database of MongoDB

1. A user created in the admin database in MongoDB that is used to connect to another database myBase;

2. Use mongoose to connect to MongoDB, when the connection address is

mongodb://username:password@my-server/myBase?authSource=admin

3. Unable to connect to the error report, isn"t authSource the source database used to indicate authentication?

4. How do I write the connection address if I want to achieve this?

Mar.23,2021

this problem occurs in the v5.2.0 version of mongoose and has been fixed in the v5.2.1 version of mongoose

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e9f193-4eefc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e9f193-4eefc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?