delete user from admin and applicationData.
Deleted the database.
show applicationData to make a new db
use admin
db.createUser({
user: “m103-application-user”,
pwd: “m103-application-pass”,
roles: [
{role: “readWrite”, db: “applicationData”}
]
})
exit the shell.
imported the data
vagrant@m103:~$ mongoimport --port=27000 --db “applicationData” --collection “products” --username “m103-application-user” --password “m103-application-pass” --authenticationDatabase “admin” /dataset/products.json
2019-12-09T06:00:28.087+0000 connected to: localhost:27000
2019-12-09T06:00:31.075+0000 [####…] applicationData.products 17.4MB/87.9MB (19.7%)
2019-12-09T06:00:34.075+0000 [#########…] applicationData.products 34.9MB/87.9MB (39.6%)
2019-12-09T06:00:37.075+0000 [##############…] applicationData.products 52.2MB/87.9MB (59.4%)
2019-12-09T06:00:40.075+0000 [###################…] applicationData.products 69.8MB/87.9MB (79.4%)
2019-12-09T06:00:43.071+0000 [########################] applicationData.products 87.9MB/87.9MB (100.0%)
2019-12-09T06:00:43.071+0000 imported 516784 documents
vagrant@m103:~$ validate_lab_import_dataset
Client experienced a timeout when connecting to the database - check that mongod is running on the correct port, and that your user was created with the correct settings.
WTF?