How to connect mongodb cluster from mongodb compass? - mongodb

I created a free mongodb cluster. I created a user,set the connection to the mongodb compass, copied the connection string and then opened my mongodb compass .Pasted the copied string there,set the password and then pressed connect.It processes for a while and then throws a error of
connection <monitor> to 15.207.225.15:27017 closed.
Can someone solve it out .

I deleted previous IP address from network access list and added it again.
Then I tried db connection from compass and it worked.

You have to add your IP address to the IP access list before you can connect to your cluster. Follow the guide.

add a new Ip address -> network access menu -> add a new IP as 'access from anywhere' and may work

I came across the same issue and this is how I solved it.
Delete the project and create a new one with the same credentials used before (if you prefer) and try connecting back again.
Note: make sure to remember your password.

just add a new Ip address just click on network access edit add your current IP address and you should be able to connect

Related

mongodb connection failed after assigning IP to new server

We have mongodb running and everything is fine with it. I can connect to it from my kubernetes cluster and from my PC. I created new kubernetes cluster, assigned IP addresses from old cluster machines to new nodes and i'm not able to connect from those new nodes. Application and settings are the same.
When i try manually connect to mongodb then:
mongo mongodb://correct-username:correct-password#correct-IP
.......
Error: Authentication failed.
When i assign those IP's back to old cluster nodes then i'm able to connect again.
Only thing that has been changed is MAC address and OS. IP addresses are the same. Is there somekind of "connection cache". Differect MAC but same IP causing problems? I'm quite new with mongodb.
Authentication happens after a successful connection. Therefore, if you are receiving an authentication error, the connection succeeded.
Since authentication is orthogonal to IP addresses, you misconfigured something during your move.
Are you using Atlas instance or self-hosted MongoDB Server?
Maybe your current setup has IP Access List (whitelist of IP addresses) configured, and when you try to connect from somewhere which is not in that list, you will not be authenticated. You should check that, and if that is the problem, just add new IP addresses on the list.
Is this a mongodb replicaSet , standalone or sharded cluster, how rs.conf() looks like? If you configure the rs based on old ip-addresses this explain the issue... , you will need to rs.reconfig() and change to the new IPs...

Timeout expired: Connecting Azure Postgres using local pdAmin

I am using psql on Azure. While I am successfully able to connect it on CLI and using Python psycopg2 or other modules and library, I am facing issue connecting it to the pgadmin Web UI.
The process to connect to the Azure POSTGRES in pgadmin is as follows:
Click on Add New Server.
Provide Name under General tab.
Provide Host, Port, DB Name, Username, Password.
After clicking on Save, it always pops connection timeout error.
While with the above config I can connect to it in the python, create cursor and commit a query. Do we require additional settings to be done for connecting it to the pgadmin. I am new to cloud and not sure if there is some additional security checks like token access to be provided or something.
Please have a check that have you enabled your local public IP address in Postgres DB Firewall rules?
After I created the new DB and added my local public IP to Firewall rules, I can connect to DB by local pgAdmin successfully:
Configs:
Allow your IP address in Azure postgresDB Networking section. You can configure your VNET or firewall rules as needed.
Check if your organization allows your IP to be visible to Azure. In my case, I was able to connect only when I was not connected to organization VPN.
"Some network environments may not report the actual public-facing IP address needed to access your server. Contact your network administrator if adding your IP address does not allow access to your server."
Under settings. Click on Networking. you will find a link like '+ Add current client IP address ( 119.160.103.152 ) + Add 0.0.0.0 - 255.255.255.255' click on it and use 0.0.0.0 to allow all public ip addresses. Now try to connect.
enter image description here
Above answer is correct but look at he above link now option for public ip is under Network option.
Connected success fully after doing this.

Mongodb Atlas connection issue

I just created a cluster in Mongodb Atlas and I can't connect to it either by my application or by the compass, the compass says: the certificate is not yet valid.
mongodb+srv://tbussola:#tindintest.fptqm.mongodb.net/test
In the application of moongose it points out: ould does not connect to any server in your MongoDB Atlas cluster. A common reason is that you are trying to access the database from an IP that is not whitelisted. Make sure that your current IP address is on the Atlas cluster IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/
mongodb+srv://tbussola:#tindintest.fptqm.mongodb.net/?retryWrites=true&w=majority
My ip is already listed in the whitelist and it is also enabled to allow any ip. What should I do now? I'm using Linux manjaro, I'm a beginner.
I was facing the same issue. After a lot of research I finally found this: certificate is not yet valid. The time on my pc was not my actual local time. After I sync my time from windows settings. Connection worked.

MySQL Workbench cannot connect from home to Google Cloud SQL

I cannot connect to my Google Cloud SQL database from my Macbook Pro using MySQL Workbench.
I have read the help file here:
https://cloud.google.com/sql/docs/mysql/admin-tools
I have added an authorized IP address for my IP per
https://cloud.google.com/sql/docs/mysql/configure-ip#add
I created a user for the database with it set to allow to connect from any host. I get the error "Can't connect to MySQL server on 'XX.XXX.XX.XXX' (60)
I have also attempted to telnet and get a consistent error that I am unable to connect to the remote host
As far as I know, I've followed all the steps but it really seems I'm getting blocked even before the server. I am trying to connect from home and I don't believe my home firewall is blocking things. I am wondering if there's something I need to open up on the GCE firewall but I have successfully connected to this database from other outside tools (e.g., Zapier).
Your best action right now would be to create a proxy with public IP address.
https://cloud.google.com/sql/docs/mysql/connect-external-app
This link will walk you through that process. If this doesn’t solve your issue, then taking your question to ServerFault (Stackoverflow sister site) might give you a better idea of how to fix your issue.

Root password set & my IP entered at Network IP required, But unable to connect

The past similar questions have been related to mysql.
But this question is about using Google Cloud SQL, project name and access control, 1. set root password; then, 2. enter network IP.
From mysql workbench, "connect" command results in "access denied for user "root" nnn.nnn.nn.nnn (using password:YES).
Please help. I must be doing something wrong!
Your help much appreciated!!!
please double check that you enabled root password and that password is correct or try to change password.
If you get that error it means that your client (Mysql Workbech) can reach the SQL instance so networking and firewall rules are OK and even Cloud SQL access control is correctly set-up to receive request from your remote client IP otherwise you would receive a 'Lost connection at Mysql server' error.
Check e.g via whatismyipaddress.com that your client IP is not changing (Dynamic IP) and it is exactly the one you authorized in Cloud SQL access control.
Sincerely,
Paolo