google-cloud-sql

Is it possible to connect to Google Cloud SQL from a Google Managed VM?

可紊 提交于 2019-12-05 01:51:42
问题 Is it possible to connect to Google Cloud SQL from a Google Managed VM? With regular Google App Engine applications, I can connect by authorizing my project in the Cloud SQL console and using unix_socket='/cloudsql/' + _INSTANCE_NAME . However, the /cloudsql/ socket doesn't seem to be available on Managed VMs. Do I have to whitelist the IP of my Managed VM application? If so, how do I find the IP address to whitelist? 回答1: The /cloudsql/ sockets are only available in regular App Engine.

Django on Google App Engine with Cloud SQL in dev environment

喜你入骨 提交于 2019-12-05 01:34:39
问题 I am trying to create an application with Django on GAE and CloudSQL as the db. I used this google developers link and this link for setting up the dev-environment. I am not able to connect to local mysql db. Here is the DATABASE setting which I am trying to use. if (os.getenv('SERVER_SOFTWARE', '').startswith('Google App Engine') or os.getenv('SETTINGS_MODE') == 'prod'): DATABASES = { 'default': { 'ENGINE': 'google.appengine.ext.django.backends.rdbms', 'INSTANCE': 'instance:appid', 'NAME':

How to remove unused temp files from Google Cloud SQL managed Postgres?

岁酱吖の 提交于 2019-12-04 19:54:02
We've moved to Google Cloud SQL, created couple of databases and imported lots of data. Alongside it was a pretty large amount of queries which were interrupted here and there which have left some garbage in form of temp files. And the storage usage went far above 1TB. postgres=> SELECT datname, temp_files AS "Temporary files", pg_size_pretty(temp_bytes) AS "Size of temporary files" FROM pg_stat_database; datname | Temporary files | Size of temporary files ---------------+-----------------+------------------------- cloudsqladmin | 0 | 0 bytes template0 | 0 | 0 bytes postgres | 0 | 0 bytes

Dedicated MySql server works with app engine

只谈情不闲聊 提交于 2019-12-04 16:50:39
I know AppEngine application runs in a restricted " sandbox " environment so that it can access limited resources like request execution time limit 60 sec (which is for speed optimization purpose) read from external file but can not write ,etc AppEngine provides a good high replication Datastore ,which is so good to store data but it is hard to mange number of quires to perform simple operation like insert, update, delete and update as it uses NoSql(basically jpa and jdo). Because of this we decide to go with Mysql,I know google itself provide cloud sql instance which uses Mysql5.6 ,I searched

Cloud Functions “Connection Refused” when connecting to Cloud SQL

匆匆过客 提交于 2019-12-04 16:29:06
I am trying to follow along with the example provided by Google to connect a Cloud Functions script to Cloud SQL with Python and a MySQL instance. I have created a Cloud SQL instance in the project and then created a Cloud Function in which I pasted the entire script from the link into the inline editor. I set the environment variables equal to what they need to be in order to connect to Cloud SQL but I am getting an error. Is there something obvious I am missing in order to make this work? Error: function crashed. Details: (2003, "Can't connect to MySQL server on 'localhost' ([Errno 111]

Unexpected exception upon serializing continuation Google Apps Script

一曲冷凌霜 提交于 2019-12-04 15:24:49
I recently started getting the error "Unexpected exception upon serializing continuation" on a spreadsheet Google Apps Script when trying to debug. The error seem to start after I created a connection to the Google CloudSQL api. This error still occurs even after commenting out the jdbc object constructor. It appears that others have had this issue and needed a Google Tech to resolve the issue. I have searched all of the discussion boards for a solution to this issue with no luck. Any chance there is a Google tech out there who could take a look under the hood for me? I would post code if I

Kubernetes can not mount a volume to a folder

情到浓时终转凉″ 提交于 2019-12-04 13:35:19
I am following these docs on how to setup a sidecar proxy to my cloud-sql database. It refers to a manifest on github that -as I find it all over the place on github repos etc- seems to work for 'everyone' but I run into trouble. The proxy container can not mount to /secrets/cloudsql it seems as it can not succesfully start. When I run kubectl logs [mypod] cloudsql-proxy : invalid json file "/secrets/cloudsql/mysecret.json": open /secrets/cloudsql/mysecret.json: no such file or directory So the secret seems to be the problem. Relevant part of the manifest: - name: cloudsql-proxy image: gcr.io

“Authorisation is required to perform that action” message, even after clicking “Allow”

天涯浪子 提交于 2019-12-04 12:45:38
I've recently run into an issue authorising a new Google App Script project, specifically one using the Cloud SQL admin API. The same code exists in previously authorised GAS projects and works fine, but if I take a copy of the GAS project and try to run a function for the first time I'm unable to complete the authorisation process. The screens I'm going through are listed below: Authorisation Required. - clicked "Review Permissions" Choose an account to authorise the Google project. - clicked my account This app isn't verified! - clicked "Go to project (unsafe)" Google project wants access to

Why is Google Appengine so slow connecting to CloudSQL

末鹿安然 提交于 2019-12-04 11:49:42
I am seeing a drastic difference in latency between development and production when connecting to a CloudSQL backend, much more so than I would expect. I ran a test where: I fetched 125, 250, 500, 1000 and 2000 rows (row size approximately 30bytes) I fetched each row size 20 times, to get a good sampling of the time The test was run in three environments: Hosted appengine Development mode locally, but connecting to CloudSQL via static IP Development mode locally and connecting to a local VM running MySQL Here you can see the results: Now I would expect some speed fluctuations on the order of

Does google app engine with mysql (Cloud SQL) support GIS?

谁说我不能喝 提交于 2019-12-04 11:21:13
I have tried to find some documentation on this on the app engine and cloud sql sites, but can't find anything referring to it either way. I know that you can perform GIS queries on their custom sql option, and I know mysql supports GIS out of the box, but I also know it requires some C libraries which there is limited support for. More particularly I am interested to know if geo-django using mysql supports gis using an app engine/cloud sql combination. (Or maybe if their custom offering supports geodjango?) GeoDjango with Cloud SQL is not supported. GeoDjango depends on several libraries that