gospodarka-przestrzenna / MongoConnector

Qgis mongodb plugin
GNU General Public License v2.0
10 stars 5 forks source link

remote database #8

Closed stefanocudini closed 3 years ago

stefanocudini commented 5 years ago

how can I connect to a remote database using custom ip address and port?

mk45 commented 5 years ago

Make some port forwarding ex.: like described here https://www.ssh.com/ssh/tunneling/example or https://blog.trackets.com/2014/05/17/ssh-tunnel-local-and-remote-port-forwarding-explained-with-examples.html

This is OS dependent but basically, localhost:27017 must be made to act as "remote":"port"

mk45 commented 5 years ago

Maybe this should be mentioned in an additional section on the project/plugin page... Additionally a "gear button" might be added as a feature with additional connection options.

sajal08oct commented 5 years ago

how can I connect to a remote database using custom ip address and port?

You can change the client configuration in connect_action.py and have ip and port you want to connect to. self.mongo_client=MongoClient(host='localhost',port=27017,connect=True)

mk45 commented 3 years ago

I saw @soohwan-hun in his fork https://github.com/soohwan-hyun/MongoConnector does something simple yet sufficient ... maybe it needs some additional work but it is basically very nice concept.

Basically it enables text box for mongo connection string. Additionally it saves string in config for user not to have it typy each time.

mk45 commented 3 years ago

As 1.3.1 is published I believe feature is satisfied.