Chapter 4: Single Facet Query Error create database

With Compass I am trying to create a new database so I can try to upload the data from companies_dataset/companies.json to my local MongoDB Enterprise installation and I get the following error

not authorized on companies to execute command { create: "startups", lsid: { id: UUID("9ed8d9cc-c1a0-4947-8823-307155c55668") }, $clusterTime: { clusterTime: Timestamp(1648459586, 1), signature: { hash: BinData(0, 601575494DBA1524955C90C3484B357A0CC3DDA5), keyId: 7028587046440534017 } }, $db: "companies" }

How can I solve it?

I do not recall having to create a database as part of the M121 course. All the works in M121 is done on the shared aggregations database of the M121 shared cluster for which we only have read access.

Perhaps you are not connected to your local MongoDB installation. Another reason might be that you are not authenticated with a user that has the appropriate privileges.

Finally, you do not have to create the database nor the collection in order to mongoimport a .json file.

Hi @steevej, this database is in the Handouts of the lesson. I think it could be that you are not authenticated with a user that has the proper privileges.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.