GCP connect other user psql instance - postgresql

We are a student group that wants to make a simple PostgreSQL project on google cloud.
I create database and tables etc. but I can't solve how my team-mates connect that database?

You can create users in the console to allow your team-mates to connect. Please follow the steps in the link for Creating a User.
As for the error message: you need to enable Cloud SQL Admin API.

Related

Connect to cloud SQL using Cloud SQL Auth is none resposinve in MySQL workbench

Im trying to create a connection for my SQL instance in GCP following their guide:
https://cloud.google.com/sql/docs/mysql/connect-admin-proxy
I set up the proxy running but I cant connect to my server.
I use MySQL workbench and the connection just timeout.
I went trough the trouble shoot guide and could not find the issue.
No errors in the cloud logs.
I try to connect using the owner google account of the project (I have all the permissions).
Cloud SQL Admin API is enabled.
I entered the password in the menu.
I saw another google guide telling to white list your IP.
I did this and its the same error.
It seems like there is a firewall or something is blocking from GCP to connect to the server but Im not sure what.
The solution for me was:
Use Cloud SQL authorized network as JM Gelilio suggested and to use pgAdmin 4 for Postgres connections.

How to create a user of MongoDB created in Google Cloud Platform?

I´ve created a MongoDB instance using the Google Click to Deploy VM and I've added a firewall rule 0.0.0.0/0 and works fine using dataGrip or connecting from outside. But now I want to create an user account for obvious reasons and I don't know how to do it.
I've done it locally installing MongoDB and executing the command db.createUser(... but I don't know how to connect to the mongo db in google cloud and execute the same command in order to create the account.
Thanks and sorry my bad english.
I haven't used the click to deploy like you're describing, but my guess is, if you go here:
https://console.cloud.google.com/compute/instances
The instance that was created for you shows up, and in the row for the instance, look for the column that says Connect, you'll see a button that says SSH. Clicking that will open a window that will connect you to the VM. It should have the MongoDB client installed and you can run commands there as if you had installed it locally and create your user.

EC2 Security Rule for Connecting to DB from PgAdmin?

I can connect to my AWS EC2 database from SSH. Now I'm trying to connect to it from pgAdmin.
I've watched YouTube videos about it and read SO posts as well, but evidently I'm still missing something, as I am still getting:
Here's my rule:
I got the endpoint I'm using from the instances tab in Amazon RDS for my database:
I clicked the link under Security groups, here, to select the security group to add my rule to:
What did I leave out/miss/get wrong? Thanks in advance to all for any advice/thoughts/info.

not able to connect to mongodb because of unauthorized lock type

I am trying to connect to my mongodb deployed in jelastic cloud
If i try to use the test database already provided in the mongodb node in jelastic..it works fine.But if i create my own database and try to access the collections created in it ..i get the following exception
com.mongodb.MongoException: unauthorized db:appdb lock type:-1 client:192.168.1.53
Why is this happening?how can i resolve it?
I am reading the configuration from a file mydb.cfg
host=mongodb-***.jelastic.servint.net
dbname=appdb
user=admin
password=*****
When in Rock Mongo web interface pick the targeted db and go for 'More' in config panel.
This has to show you the list of users having rights for DB.
Did you set the user and rights for your custom collection?
Try to check the configuration under 'Authentication' section?
Anyway, supposedly admin user should have rights to all DBs. You can try to figure this issue out at Jelastic community
I had the same issue when connection to mongodb custom named database.
In order to succeed with the connection, I have created an user for my custom named database.
(I added the provided admin user with its password to the authorized users as the image shown).

Cloudfoundry relation "user" does not exist

I'm currently trying to deploy my application in cloudfoundry. My web is built on spring+postgre+hibernate. The problem I'm having is whenever I try to access the database, I'm having an error relation "user" does not exist.
I am sure that it is properly connecting to a postgres database. But my problem is that , it seems like it is not connecting to my local database but instead to somewhere else that's why it can't access the user table I defined.
I've tried to execute some query like "select * from pg_tables", and it executes well but the result is not the same with my local database. I've also seen that the table owner is vcap. I wonder why I'm having this error and how I could solve it.
I've been trying to fix these a couple of days. But to no avail that's why I've already posted here.
I hope someone could help me here.
I'll appreciate it a lot!
As a follow-on to ebottard's comment suggestion that addresses provisioning a service,
a way to prepopulate the database is to use a tunnel which connects your postgres client to the cloudfoundry postgres database, as described in Tunneling to a Cloudfoundry Service.