Unable to run any match or project codes

Whenever I try to run any commands, i keep getting this error

MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.solarSystem.aggregate([{
… “$match”: { “type”: { “$ne”: “Star” } }
… }]).pretty()
2019-06-21T15:36:10.625-0700 E QUERY [js] Error: command failed: {
“operationTime” : Timestamp(1561156569, 1),
“ok” : 0,
“errmsg” : “not authorized on movies to execute command { aggregate: “solarSystem”, pipeline: [ { $match: { type: { $ne: “Star” } } } ], cursor: {}, lsid: { id: UUID(“a2c31c35-da8f-4317-ba9d-d212a3d2d9c0”) }, $clusterTime: { clusterTime: Timestamp(1561156559, 1), signature: { hash: BinData(0, F8ADEC9E29A1CA0857AEB5F9FA94DF9DB13197B3), keyId: 6661714504839069697 } }, $db: “movies” }”,
“code” : 13,
“codeName” : “Unauthorized”,
“$clusterTime” : {
“clusterTime” : Timestamp(1561156569, 1),
“signature” : {
“hash” : BinData(0,“BqCqgJQLtJcJ3KExINxWpMuhSu8=”),
“keyId” : NumberLong(“6661714504839069697”)
}
}
} : aggregate failed :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
doassert@src/mongo/shell/assert.js:18:14
_assertCommandWorked@src/mongo/shell/assert.js:536:17
assert.commandWorked@src/mongo/shell/assert.js:620:16
DB.prototype._runAggregate@src/mongo/shell/db.js:260:9
DBCollection.prototype.aggregate@src/mongo/shell/collection.js:1062:12
@(shell):1:1

Are you connected to correct DB?
It works for me

MongoDB Enterprise Cluster0-shard-0:PRIMARY> db
aggregations
MongoDB Enterprise Cluster0-shard-0:PRIMARY>
MongoDB Enterprise Cluster0-shard-0:PRIMARY> db.solarSystem.aggregate([{ “$match”: { “type”: { “$ne”: “Star” } }}]).pretty()
{
“_id” : ObjectId(“59a06674c8df9f3cd2ee7d58”),
“name” : “Uranus”,

I’m using the cluster that is available in the $match lab from chapter 1

mongo “mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017,cluster0-shard-00-01-jxeqq.mongodb.net:27017,cluster0-shard-00-02-jxeqq.mongodb.net:27017/aggregations?replicaSet=Cluster0-shard-0” --authenticationDatabase admin --ssl -u m121 -p aggregations --norc

Yes with your given command i am able to connect and run the query

By any chance did you switch/change DB by use DB command?

Why would it say movies?

“errmsg” : “not authorized on movies to execute command { aggregate: