Skip to content

password and username #1

@FilipHarald

Description

@FilipHarald

Thank you for doing this plugin.

Is there a way to connect to a password protected instance? I have tried two ways:

1

This...

:Mongoconnect --host=<my-db-ip> --db=<my-db-name> --username=<my-username> --password=<my-password>
:Mongocollections

... gives this error...

Error executing Lua callback: Vim:E474: Unidentified byte: MongoServerError: there are no users authenticated

stack traceback:
        [C]: in function 'json_decode'
        ...arald/.local/share/nvim/plugged/mongo.nvim/lua/mongo.lua:68: in function 'get_collections'
        ...cal/share/nvim/plugged/mongo.nvim/plugin/mongo/mongo.lua:64: in function <...cal/share/nvim/plugged/mongo.nvim/plugin/mongo/mongo.lua:63>

2

This...

:Mongoconnect mongodb://${username}:${password}@${host}:${port}/${name}

...gives this error...

Error executing Lua callback: Vim:E474: Unidentified byte: MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017

stack traceback:
        [C]: in function 'json_decode'
        ...arald/.local/share/nvim/plugged/mongo.nvim/lua/mongo.lua:43: in function 'get_dbs'
        ...cal/share/nvim/plugged/mongo.nvim/plugin/mongo/mongo.lua:50: in function <...cal/share/nvim/plugged/mongo.nvim/plugin/mongo/mongo.lua:47>

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgood first issueGood for newcomersquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions