The Compass tool is developed by MongoDB and released free of charge. It can be used to query, aggregate and analyze NoSQL databases. Compass can be downloaded as a standalone program or as part of the MongoDB Community Server software package.
On our server, we have disabled remote access to the MongoDB database, so we connect Compass via SSH.
After the installation we navigate via "Fill in connection fields individually" to enter a new connection (the SSH credentials are based on the previous work of setting up a Linux web server and setting up Databases):
Under "Hostname" the default data can be taken over. With me it happened from time to time that the port has changed. The default port is 27017
. The data for the SSH tunnel are entered under "More Options":
The connection parameters are:
- Hostname
- Hostname:
localhost
- Port:
27017
- SRV Record:
off
- Authentication:
none
- Hostname:
- More Options
- SSH Tunnel:
Use Identity File
- SSH Hostname:
116.203.69.89
(server IP) - SSH Tunnel Port:
22123
(server Port) - SSH Username:
tom
- SSH Identity file: "path to private key"
- SSH Passphrase:
*****
- SSH Tunnel:
The data can be saved via "Favorite":
With "Connect" the connection is established.