google-cloud-sql

“new ephemeral certificate expires too soon: current time:”M

China☆狼群 提交于 2020-02-25 13:28:49
问题 I've been connecting to Google Cloud Platform MySQL from the CloudSQL Proxy on Windows for years. All of a sudden, I'm unable to connect. When I start the proxy using PowerShell, it launches fine and says ready for new connections. Then when I try to connect to it on 127.0.0.1, the client will report back: "Lost connection to MySQL server during query (127.0.0.1:3306)" The CloudSQL Proxy will report in the terminal: "error: new ephemeral certificate expires too soon: current time: 2019-06-28

how to connect to Cloud SQL from Google DataFlow

和自甴很熟 提交于 2020-02-25 06:45:27
问题 I'm trying to create a pipeline task using beam java SDK and Google Dataflow to move data from Cloud SQL to Elastic search I've created the following class main method: public static void main(String[] args) throws Exception{ DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class); options.setProject("staging"); options.setTempLocation("gs://csv_to_sql_staging/temp"); options.setRunner(DataflowRunner.class); options.setGcpTempLocation("gs://csv_to_sql

Cloud SQL to BigQuery incrementally

偶尔善良 提交于 2020-02-22 22:40:27
问题 I need some suggestions for one of the use cases I am working on. Use Case: We have data in Cloud SQL around 5-10 tables, some are treated as lookup and others transactional. We need to get this to BigQuery in a way to make 3-4 tables(Flattened, Nested or Denormalized) out of these which will be used for reporting in Data Studio, Looker, etc. Data should be processed incrementally and changes in Cloud SQL could happen every 5 min, which means that data should be available to BigQuery

Backup and Restore Single Schema/Table

人走茶凉 提交于 2020-02-05 12:44:45
问题 Is there a way to backup or restore a specific schema or table on a Cloud SQL server? Backing up the entire set of data, but then being able to restore only certain schemas or tables would be very helpful for multi-tenant systems. 回答1: The Cloud SQL use MySQL database with some limitations. You can check out the unsupported features and functions at the following link: https://cloud.google.com/sql/faq#supportmysqlfeatures With this in mind any backup/restore tool that are being used for MySQL

Cloud build permission denied when deploy to cloud run with “--set-sql-instance” argument

强颜欢笑 提交于 2020-02-04 08:48:17
问题 I'm trying to configure cloud build triggers which build maven springboot project and then deploy to cloud runs. I run into a problem where it works when i don't specify the cloud sql instance to be connected with, but when I add "--set-cloudsql-instances", "${_DATABASE_CONNECTION_NAME}" as one of the args, it throws error on cloud build as follows: Step #1: ERROR: (gcloud.beta.run.deploy) PERMISSION_DENIED: The caller does not have permission Finished Step #1 ERROR ERROR: build step 1 "gcr

How to turn on/off CloudSQL instances using Python3

我怕爱的太早我们不能终老 提交于 2020-02-02 17:28:09
问题 I'm trying to use a Python script to turn on/off a CloudSQL Instance in GoogleCloud. I've finally found a way to do it, using the GoogleCloudAPI, in Shell: ### shell script ACCESS_TOKEN="$(gcloud auth print-access-token)" ACTIVATION_POLICY="ALWAYS/NEVER" # Use 'ALWAYS' to turn on, 'NEVER' to turn off curl --header "Authorization: Bearer ${ACCESS_TOKEN}" --header 'Content-Type: application/json' --data '{"settings" : {"activationPolicy" : "${ACTIVATION_POLICY}"}}' -X PATCH https://www

Logging into GCP SQL: How to Ensure PromptSession Is Imported or Otherwise Resolve

风流意气都作罢 提交于 2020-01-25 07:28:06
问题 I am trying to use the Cloud Shell to update some user permissions. I am logging in using gcloud sql connect my-instance --user=root gcloud sql connect my-instance Whitelisting your IP for incoming connection for 5 minutes...done. Connecting to database with SQL user [sqlserver].******************************************************************************** Python command will soon point to Python v3.7.3. Python 2 will be sunsetting on January 1, 2020. See http://https://www.python.org/doc

Are these limitations still there when using JPA with Cloud SQL?

徘徊边缘 提交于 2020-01-25 01:59:30
问题 I doubt it but still want to confirm if these limitations are still there or not when using JPA with Cloud SQL. Unsupported Features of JPA 1.0 The following features of the JPA interface are not supported by the App Engine implementation: Owned many-to-many relationships, and unowned relationships. You can implement unowned relationships using explicit Key values, though type checking is not enforced in the API. "Join" queries. You cannot use a field of a child entity in a filter when

Yii CDbConnection failed to open the DB connection: could not find driver with google cloud sql

痴心易碎 提交于 2020-01-24 22:05:33
问题 I'm having an issue with Yii and a mysql database running on Google Cloud sql. Quick overview: We have moved this from an existing server where it all worked with no issues at all and have now set up a Google Compute Engine server with php and all the relivant drivers mysql_pdo being one of them. We also have a Google Cloud SQL database storing all of our existing database information. What I have tried I have written a simple php script which uses PDO('mysql:<IPADDRESS>;dbname=<MYDBNAME>,

Yii CDbConnection failed to open the DB connection: could not find driver with google cloud sql

送分小仙女□ 提交于 2020-01-24 22:05:05
问题 I'm having an issue with Yii and a mysql database running on Google Cloud sql. Quick overview: We have moved this from an existing server where it all worked with no issues at all and have now set up a Google Compute Engine server with php and all the relivant drivers mysql_pdo being one of them. We also have a Google Cloud SQL database storing all of our existing database information. What I have tried I have written a simple php script which uses PDO('mysql:<IPADDRESS>;dbname=<MYDBNAME>,