Mongodb Atlas: not authorized on admin to execute command











up vote
5
down vote

favorite












I have a MongoDB Atlas cluster within which I am trying to simply copy a database within the same instance. Unfortunately, every time I try to run db.copyDatabase() or copydb admin command, I get the following error:



not authorized on admin to execute command


Which is very strange, because I just have one user, and it has access to everything, at least as far as I can tell on atlas (Click to see image here).



I did some search in stackoverflow, but it looked like most of the answers pertain to mongod instances running locally, and not ones running in atlas... Did I setup the user wrong?










share|improve this question


























    up vote
    5
    down vote

    favorite












    I have a MongoDB Atlas cluster within which I am trying to simply copy a database within the same instance. Unfortunately, every time I try to run db.copyDatabase() or copydb admin command, I get the following error:



    not authorized on admin to execute command


    Which is very strange, because I just have one user, and it has access to everything, at least as far as I can tell on atlas (Click to see image here).



    I did some search in stackoverflow, but it looked like most of the answers pertain to mongod instances running locally, and not ones running in atlas... Did I setup the user wrong?










    share|improve this question
























      up vote
      5
      down vote

      favorite









      up vote
      5
      down vote

      favorite











      I have a MongoDB Atlas cluster within which I am trying to simply copy a database within the same instance. Unfortunately, every time I try to run db.copyDatabase() or copydb admin command, I get the following error:



      not authorized on admin to execute command


      Which is very strange, because I just have one user, and it has access to everything, at least as far as I can tell on atlas (Click to see image here).



      I did some search in stackoverflow, but it looked like most of the answers pertain to mongod instances running locally, and not ones running in atlas... Did I setup the user wrong?










      share|improve this question













      I have a MongoDB Atlas cluster within which I am trying to simply copy a database within the same instance. Unfortunately, every time I try to run db.copyDatabase() or copydb admin command, I get the following error:



      not authorized on admin to execute command


      Which is very strange, because I just have one user, and it has access to everything, at least as far as I can tell on atlas (Click to see image here).



      I did some search in stackoverflow, but it looked like most of the answers pertain to mongod instances running locally, and not ones running in atlas... Did I setup the user wrong?







      mongodb mongodb-atlas






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 4 at 23:21









      Seaside9

      1486




      1486
























          2 Answers
          2






          active

          oldest

          votes

















          up vote
          9
          down vote



          accepted










          I ended up asking this question to MongoDB University discussion board. In case anyone comes across this, this is apparently because I am using a free cluster.






          share|improve this answer

















          • 2




            For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
            – Pete Garafano
            Mar 5 at 16:09










          • I have the same problem but M10 did changing to M10 resolved this?
            – Alan Ortega
            Sep 25 at 21:49


















          up vote
          0
          down vote













          this error is because you are trying create the colecction above admin, in atlas this isn't possible because securty.



          in this case you need to use the word key use [collection_name]



          this is the link for this answer.



          it is in spanish.



          https://victorroblesweb.es/2016/12/24/crear-una-base-datos-mongodb/






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














             

            draft saved


            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49101567%2fmongodb-atlas-not-authorized-on-admin-to-execute-command%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            9
            down vote



            accepted










            I ended up asking this question to MongoDB University discussion board. In case anyone comes across this, this is apparently because I am using a free cluster.






            share|improve this answer

















            • 2




              For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
              – Pete Garafano
              Mar 5 at 16:09










            • I have the same problem but M10 did changing to M10 resolved this?
              – Alan Ortega
              Sep 25 at 21:49















            up vote
            9
            down vote



            accepted










            I ended up asking this question to MongoDB University discussion board. In case anyone comes across this, this is apparently because I am using a free cluster.






            share|improve this answer

















            • 2




              For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
              – Pete Garafano
              Mar 5 at 16:09










            • I have the same problem but M10 did changing to M10 resolved this?
              – Alan Ortega
              Sep 25 at 21:49













            up vote
            9
            down vote



            accepted







            up vote
            9
            down vote



            accepted






            I ended up asking this question to MongoDB University discussion board. In case anyone comes across this, this is apparently because I am using a free cluster.






            share|improve this answer












            I ended up asking this question to MongoDB University discussion board. In case anyone comes across this, this is apparently because I am using a free cluster.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Mar 5 at 16:00









            Seaside9

            1486




            1486








            • 2




              For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
              – Pete Garafano
              Mar 5 at 16:09










            • I have the same problem but M10 did changing to M10 resolved this?
              – Alan Ortega
              Sep 25 at 21:49














            • 2




              For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
              – Pete Garafano
              Mar 5 at 16:09










            • I have the same problem but M10 did changing to M10 resolved this?
              – Alan Ortega
              Sep 25 at 21:49








            2




            2




            For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
            – Pete Garafano
            Mar 5 at 16:09




            For your (and anybody else coming across this) reference: docs.atlas.mongodb.com/unsupported-commands and docs.atlas.mongodb.com/reference/free-shared-limitations
            – Pete Garafano
            Mar 5 at 16:09












            I have the same problem but M10 did changing to M10 resolved this?
            – Alan Ortega
            Sep 25 at 21:49




            I have the same problem but M10 did changing to M10 resolved this?
            – Alan Ortega
            Sep 25 at 21:49












            up vote
            0
            down vote













            this error is because you are trying create the colecction above admin, in atlas this isn't possible because securty.



            in this case you need to use the word key use [collection_name]



            this is the link for this answer.



            it is in spanish.



            https://victorroblesweb.es/2016/12/24/crear-una-base-datos-mongodb/






            share|improve this answer

























              up vote
              0
              down vote













              this error is because you are trying create the colecction above admin, in atlas this isn't possible because securty.



              in this case you need to use the word key use [collection_name]



              this is the link for this answer.



              it is in spanish.



              https://victorroblesweb.es/2016/12/24/crear-una-base-datos-mongodb/






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                this error is because you are trying create the colecction above admin, in atlas this isn't possible because securty.



                in this case you need to use the word key use [collection_name]



                this is the link for this answer.



                it is in spanish.



                https://victorroblesweb.es/2016/12/24/crear-una-base-datos-mongodb/






                share|improve this answer












                this error is because you are trying create the colecction above admin, in atlas this isn't possible because securty.



                in this case you need to use the word key use [collection_name]



                this is the link for this answer.



                it is in spanish.



                https://victorroblesweb.es/2016/12/24/crear-una-base-datos-mongodb/







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 18 at 3:01









                camilo lopez

                1




                1






























                     

                    draft saved


                    draft discarded



















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49101567%2fmongodb-atlas-not-authorized-on-admin-to-execute-command%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    "Incorrect syntax near the keyword 'ON'. (on update cascade, on delete cascade,)

                    Alcedinidae

                    RAC Tourist Trophy