PMXBOT Log file Viewer

Help | Karma | Search:

#mongodb logs for Thursday the 7th of June, 2018

(Back to #mongodb overview) (Back to channel listing) (Animate logs)
[12:27:58] <luna_rabbit> Trying to create a user in admin db gives the error 'not authorized on admin to execute command'. Same error message is displayed on the use of any command, including show dbs
[12:31:02] <luna_rabbit> use admin db.createUser( { user: "myUserAdmin", pwd: "abc123", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] } )
[12:31:24] <luna_rabbit> Same error is displayed for this as well
[12:53:16] <luna_rabbit> Trying to create a user in admin db gives the error 'not authorized on admin to execute command'. Same error message is displayed on the use of any command, including show dbs
[12:53:28] <luna_rabbit> use admin db.createUser( { user: "myUserAdmin", pwd: "abc123", roles: [ { role: "userAdminAnyDatabase", db: "admin" } ] } )
[12:53:35] <luna_rabbit> Same error is displayed for this as well
[13:13:08] <deathanchor> use admin;
[13:13:28] <deathanchor> are you authenticated?
[13:13:53] <deathanchor> db.auth('user', 'pwd'); // for the user that has admin role
[13:14:16] <deathanchor> if not you have to startup the DB without authorization, setup an admin role user then you can do it
[14:13:22] <reie> Derick: hello again. Two days ago I have tried to use the 'Contact Us' form on the MongoDB site to reach the sales team. No answer yet.
[18:55:26] <deathanchor> anyone know how I can give someone dbAdmin to all DBs and no access to the admin db?
[19:11:47] <deathanchor> nevermind, i see it's more complex than that.
[20:44:30] <bsamorim> Hello, I can't seem to be able to assign ISODate objects to fields of a $jsonSchema-validated collection.
[20:45:01] <bsamorim> What type of objects can I assign to such fields? I can't find such info anywhere in the docs
[20:45:41] <bsamorim> minimum example of my problem: `db.createCollection("coll", {validator: { $jsonSchema: { bsonType: "object", properties: { ts: { bsonType: "timestamp" } } } }});db.coll.insert({ts: ISODate("2018-06-04T00:00:00.101Z") });`
[20:55:28] <bsamorim> oops, sorry for the question, i thought 'timestamp' was the only available date-ish type
[20:56:02] <bsamorim> just found out that 'date' type exists also...after changing the jsonSchema, everything worked just fine
[21:20:58] <bsamorim> does schemaing a collection have any performance benefits?
[21:21:15] <bsamorim> or is validation its only use?