google-cloud-sql

Connecting to Google Cloud SQL from Eclipse Not Using App Engine

◇◆丶佛笑我妖孽 提交于 2019-12-11 08:36:12
问题 We are trying to connect to Google Cloud SQL from Eclipse using the Database Development perspective. To do so I'm trying to add a new Database Connection, which I was able to do successfully for a local MySQL instance running on my machine. The motivation for doing this is that we currently run our JUnit tests against the local instance. However, we are switching to Hibernate and want to make sure that all of our configuration files work with Cloud SQL. As a general guide I've been using:

PHP (PDO) Connection to Cloud SQL on Google App Engine Not Working

折月煮酒 提交于 2019-12-11 08:35:48
问题 I am experiencing issues connecting to a Cloud SQL instance hosted in an App engine flexible environment which shares same project. I am using PHP Data Object (PDO) to create the connection. I Kept getting this error: SQLSTATE[HY000] [2002] No such file or directory Even when I had done all the settings as to authorizing the app, etc. Here is my sample code: public function __construct() { try { $this->datab = new PDO('mysql:unix_socket=/cloudsql/<MY INSTANCE CONNECTION NAME>;dbname=MY

Unable to connect to Cloud SQL from different project on App Engine flex Java

霸气de小男生 提交于 2019-12-11 08:24:04
问题 Here's the exception that's thrown: javax.servlet.ServletException: javax.servlet.ServletException: org.glassfish.jersey.server.ContainerException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. I also get this message later on the stack trace: Caused by: java.lang.RuntimeException: The Google Cloud SQL API is not enabled for project [xxxxxx]. Please use the Google Developers Console to enable it: https://console.cloud

Where i find and download this jar file com.mysql.jdbc.GoogleDriver?

泄露秘密 提交于 2019-12-11 06:26:24
问题 I am working with Jdbc and CloudSql I followed this tutorial https://developers.google.com/appengine/docs/java/cloud-sql/ when i Load this class com.mysql.jdbc.GoogleDriver by using class.forName("com.mysql.jdbc.GoogleDriver"); I got ClassNotFoundException any one tell me where i download this jar? 回答1: You'd use the com.mysql.jdbc.GoogleDriver driver only when running your application on AppEngine. Is that the case? If so, have you enabled mysql connector/j per https://developers.google.com

Connect to Cloud SQL in Google App Engine using mysqli_connect

a 夏天 提交于 2019-12-11 06:04:25
问题 I am trying to configure my Wordpress site in the Google App Engine standard environment. I have configured a Cloud SQL for MySQL Second Generation instance and can access it using Cloud SQL Proxy. The problem I have is connected to the Cloud SQL instance after the app has been deployed to the Google App Engine (GAE) environment. Here are two different connection strings; one for the GAE environment and another for the local environment. if (isset($_SERVER['GAE_ENV'])) { $dbConn = mysqli

Google Cloud SQL Restart and Update

浪子不回头ぞ 提交于 2019-12-11 05:52:25
问题 Randomly, out of nowhere, we stopped being able to connect to the Google Cloud SQL database at almost precisely 8:30 am ET this morning. We then tried to restart the instance and have been stuck for more than an hour with a similar situation to this question. It seems that this sort of freak accident has happened before on Google Cloud SQL. The problem is that the instance is completely unresponsive to any commands - either via the GUI or the command line. To make matters worse, there's no

Cannot use mysqli in php flex env on app engine

徘徊边缘 提交于 2019-12-11 05:22:00
问题 I recently switched from a standard env to a flex env, so that I could use sockets in my php app. However, now my mysqli function is not working when deployed... This is what the function and error call looks like... $link = new mysqli( null, // host 'user', // username null, // password 'db', // database name null, '/cloudsql/myapp:us-central1:sql-instance' // instance name ); Am I missing something? Can I use mysqli in a flex env? Here are the error logs... 2017-06-22 21:40:16 admin

Cloud SQL from App Engine (flexible environment) connection issue

时光毁灭记忆、已成空白 提交于 2019-12-11 04:59:46
问题 I'm trying to access my Cloud SQL instance from my App Engine flexible environment NodeJS application but kept getting timeout issues. When I add the IP of the compute engine running the App engine to the Cloud SQL Access Control it works. The documentation states that access should be granted automatically if both are in the same project. What am I missing? I'm using the following connection settings for knex: const config = { host: 'myIP', user: 'user', password: 'password', database:

Google cloud sql export csv fails when contains nulls

萝らか妹 提交于 2019-12-11 04:52:43
问题 I'm exporting a table from my Mysql database in Cloud Sql with the command, gcloud sql export csv INSTANCE URI --query = QUERY I have the file in my bucket, but when I try to import into Bigquery it fails, I noticed that all nulls are replaced by "n, not even close the quote. I found that this is a known bug, https://cloud.google.com/sql/docs/mysql/known-issues Someone has a temporary solution? thanks a lot. 回答1: The fix for this issue is still currently being addressed by the Cloud SQL Team.

How to reduce Google Cloud SQL instance size?

冷暖自知 提交于 2019-12-11 04:25:29
问题 I have a Google Cloud SQL MySQL 2nd Gen 5.7 instance with 70GB of unused storage. I want to reduce the unused storage of my instance as this is one of the major hosting costs. The only way that I'm seeing as a possibility is dumping all the database to a new Google Cloud SQL instance created with the right storage capacity. However this approach has several pitfalls: It would require a lot of time to dump and load the database (this would require severe downtime in the websites that are using