I have the following code
$bulkWrite=new MongoDB\Driver\BulkWrite;
$filter = ['name' => 'John'];
$update = ['$set' => ['name' => 'Smith', age: 35, profession => 'pilot']];
$options = array('multi' => false, 'upsert' => false);
$bulkWrite->update($filter, $options);
$mongoConn->executeBulkWrite('MyCollection', $bulkWrite);
The code returns the error:
Exception:not authorized on db to execute command { update:
What is the issue?