Tuesday, May 31, 2022

[google-cloud-sql-discuss] Re: Share Cloud SQL DB between 2 projects with app engine

Ok
 solution found. 

Just need to add service account of ProjectB to IAM of ProjectA

Le lundi 30 mai 2022 à 18:39:19 UTC+2, - - a écrit :
Hi, 
I have a postgres Cloud SQL DB instance in my project A, it works perfectly with my django project on App Engine of project A. 

Now I have developed a project B and I would like to share the DB instance with project B. 
I put the same host as project A in the settings file of project B like:

/cloudsql/project-285409:europe-west4:project-A-DB

but when I deploy project B on app engine, django keeps having connection error 

could not connect to server: Connection refused   
Is the server running locally and accepting connections on Unix domain socket "/cloudsql/project-285409:europe-west4:project-A-DB.s.PGSQL.5432"?

I have enabled Cloud SQL API

Did I miss some settings or it is not possible to share DB between 2 projects?

Thank you







--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/1cdf81e1-6635-4378-a342-95bb8b4f27d0n%40googlegroups.com.

No comments:

Post a Comment