google-cloud-sql

Statement cancelled due to timeout or client request

血红的双手。 提交于 2021-02-17 06:21:36
问题 I am trying to add data to my Google Cloud SQL database using Google App Script. My code was working fine last night when I finished but when I ran it this morning it is now giving me the error "statement cancelled due to timeout or client request", the error I am getting in the cloud console is "Got an error reading communication packets". Last night it was processing about 1,600 lines of data. I have played around with it and narrowed it down that the error will occur when there is more the

Statement cancelled due to timeout or client request

佐手、 提交于 2021-02-17 06:21:30
问题 I am trying to add data to my Google Cloud SQL database using Google App Script. My code was working fine last night when I finished but when I ran it this morning it is now giving me the error "statement cancelled due to timeout or client request", the error I am getting in the cloud console is "Got an error reading communication packets". Last night it was processing about 1,600 lines of data. I have played around with it and narrowed it down that the error will occur when there is more the

Not able to connect Laravel application on App Engine to Cloud SQL database

元气小坏坏 提交于 2021-02-10 16:44:33
问题 I have a Laravel application running on Google App Engine and I want to connect it to the Google Cloud SQL database I have. I have tried many solutions none of them fixed the problem. Everytime it does a request to the database, it throws SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from sessions where id = CQZwtQFAm5RCYcP4ZSqf5mtxTnebGUigQQKVluJa limit 1) . I do have the sessions table, and I also get this error while trying to log in but with the users table then. I've

How do I connect and retrieve data from Google Cloud SQL using PHP?

给你一囗甜甜゛ 提交于 2021-02-10 09:37:08
问题 The only tutorials I could find used unfamiliar alternative resources, like app engine, composer, github, proxies, other plugins. Isn't it possible to simply connect to it using pure PHP? For example, in the following code would I need to modify to get data from Google Cloud SQL? <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!

How do I connect and retrieve data from Google Cloud SQL using PHP?

心不动则不痛 提交于 2021-02-10 09:36:43
问题 The only tutorials I could find used unfamiliar alternative resources, like app engine, composer, github, proxies, other plugins. Isn't it possible to simply connect to it using pure PHP? For example, in the following code would I need to modify to get data from Google Cloud SQL? <?php $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!

Unable to connect to CloudSQL from Kubernetes Engine (Can't connect to MySQL server on 'localhost')

南笙酒味 提交于 2021-02-10 06:30:52
问题 I tried to follow the steps in: https://cloud.google.com/sql/docs/mysql/connect-kubernetes-engine. I have the application container and the cloudsql proxy container running in the same pod. After creating the cluster, logs for the proxy container seems correct: $kubectl logs users-app-HASH1-HASH2 cloudsql-proxy 2018/08/03 18:58:45 using credential file for authentication; email=it-test@tutorial-bookshelf-xxxxxx.iam.gserviceaccount.com 2018/08/03 18:58:45 Listening on 127.0.0.1:3306 for

connecting google cloud function to cloud sql (postgreSQL)

三世轮回 提交于 2021-02-08 11:37:55
问题 I'm trying to connect google cloud function with google cloud sql (postgreSQL). I found document and do exactly same things with document (I think...) but I got error. https://cloud.google.com/sql/docs/postgres/quickstart-connect-functions my cloud function requirements.txt SQLAlchemy==1.3.12 pg8000==1.13.2 and my main.py import sqlalchemy # Set the following variables depending on your specific # connection name and root password from the earlier steps: connection_name = "tram-2020:us

How do you create a TLS connection to a Cloud SQL database using Go?

本秂侑毒 提交于 2021-02-07 07:51:22
问题 I'm trying to create a TLS connection to a Cloud SQL database but I'm getting the following error when trying to prepare a statement: x509: cannot validate certificate for <cloud sql instance ip> because it doesn't contain any IP SANs Here is my setup code: rootCertPool := x509.NewCertPool() pem, err := ioutil.ReadFile("/path/server-ca.pem") if err != nil { log.Fatal(err) } if ok := rootCertPool.AppendCertsFromPEM(pem); !ok { log.Fatal("Failed to append PEM.") } clientCert := make([]tls

Google Cloud SQL Restore BAK file

眉间皱痕 提交于 2021-01-29 16:42:13
问题 I am new in Google Cloud. I created a Cloud SQL Instance and I need to restore the data from a .bak file. I have the .bak file in a GCS bucket, and I am trying to restore using Microsoft Management Studio -> Task -> Restore. But I'm not able to access the file. Can anyone help me with the procedure on how to restore from a .bak file? 回答1: You need to give the Cloud SQL service Account access to the bucket where the file is saved. On Cloud Shell run the following: gcloud sql instances describe

Unable to connect to postgres in cloud sql from google app engine nodes

丶灬走出姿态 提交于 2021-01-29 12:31:58
问题 I am working on a nodejs and postgres application. Both are deployed in google. I have my postgres in google cloud sql and nodejs is deployed in google app engine. I am trying to connect to postgres from nodejs, but it throws it cannot connect to cloud postgres. I have updated app.yml file and i am using regular pg client and not knex. Can anyone help me. My config as below const client = new Client({ user: 'postgres', host:'xx.xx.xx.xx', socketpath: '/cloudsql/proj-name:us-central1:app-name'