google-cloud-sql

The request to API call datastore_v3.Put() was too large

岁酱吖の 提交于 2019-12-04 11:05:45
问题 I am using google cloud sql with appengine. I am getting com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to API call datastore_v3.Put() was too large. despite I am not using the Datasotre API. I think according to the docs https://developers.google.com/appengine/docs/java/cloud-sql/developers-guide#access_limits that the data-size limit is 16MB served in 60 seconds. My data size is around 1 MB and my response is definitely less than 1 minute. If I try with smaller

Change Google Cloud SQL CURRENT_TIMESTAMP time zone?

瘦欲@ 提交于 2019-12-04 10:31:10
问题 I'm using CURRENT_TIMESTAMP in Google Cloud SQL and according to Google, it returns the server's current time. Currently, with the time that it returns, it looks like the server's at UTC -1 (i.e., in the Atlantic Ocean). This is not very helpful. How do I change the timezone and have it display the right time (i.e., a time zone of my own choosing) whenever I call CURRENT_TIMESTAMP ? 回答1: There is a new way to to change Google cloud SQL time zone https://stackoverflow.com/a/29758598/4121388

SSL self-signed certifications to connect with Mysql with PHP

╄→尐↘猪︶ㄣ 提交于 2019-12-04 06:36:26
Summary: PHP gives an error when using self-signed certificates as provided by Google Cloud SQL. Details: I am trying to connect to Google Cloud SQL's mysql instance using PHP's mysqli library. $db = mysqli_init(); mysqli_options ($db, MYSQLI_OPT_SSL_VERIFY_SERVER_CERT, true); $db->ssl_set('client-key.pem', 'client-cert.pem', 'server-ca.pem', NULL, NULL); $query = mysqli_real_connect ($db, $host, $user, $pass, $dbname, 3306, NULL, MYSQLI_CLIENT_SSL); As I understand Google cloud allows self-signed certificates, from where I downloaded the client-key.pem, client-cert.pem, server-ca.pem files. I

Alternative to user defined functions in Google's Cloud SQL

给你一囗甜甜゛ 提交于 2019-12-04 04:04:33
I just transferred my database to Google's Cloud SQL, but as stated in the FAQ on Google Cloud SQL , it says user defined functions are not supported. I am using a function called Levenshtein, taken from this stackoverflow article , to perform a search on a dictionary that I created in my database. It is a function that can find words that look similar (including misspellings) and returns the distance from a given word. Does Google offer any alternatives to user defined functions that would allow me to use this functionality to perform search? David You are confused about terminology: User

JDBC connection pool compatible with App Engine

◇◆丶佛笑我妖孽 提交于 2019-12-04 03:01:21
Note: I know about this thread but it is quite old and moreover, the solution did not work for me. I am using App Engine along with Cloud SQL and I would like to share a pool of open connections between all of the application's current users. I have tried several connection pool implementations and they all work perfectly with the local development server, however, when deployed to the cloud, they fail. I suppose that the reason is App Engine's restricted "sandbox" environment. Does anyone know about JDBC connection pool working on App Engine? Apache Commons DBCP ... Caused by: java.lang

Is there a way to access google cloud SQL via proxy inside docker container

左心房为你撑大大i 提交于 2019-12-04 02:12:17
I have multiple docker machines(dev,staging) running on Google Compute Engine which hosts Django servers(this needs access to Google Cloud SQL access). I have multiple Google Cloud SQL instances running, and each instance is used by respective docker machines on my Google Compute Engine instance. Currently i'm accessing the Cloud SQL by whitelisting my Compute Engine IP. But i dont want to use IPs for obvious reasons ie., i dont use a static ip for my dev machines. But Now want to use google_cloud_proxy way to gain the access. But How do i do that ! GCP gives multiple ways to access google

GAE CloudSQL with MySQL access denied

半腔热情 提交于 2019-12-03 20:18:38
I have a web application that is working fine under the following environment GWT 2.4.0 RestEasy 2.3.2.Final JAX-RS & JAXB Hibernate JPA 2.0 (hibernate-entitymanager + hibernate-validator) 4.2.0.Final MySQL 5.5.22 at localhost (Ubuntu 12.04) VMware 2.6 tomcat server The application is working successfully using JAX-RS, JAXB, Jackson JSON provider, Hibernate JPA annotations all mixed together into the same DTO. I am trying to port it to GAE CloudSQL. I am encountering MySQL access errors. I had to change the ORM from Hibernate to EclipseLink 2.3.2. Reminder : I respectfully request answerers

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

牧云@^-^@ 提交于 2019-12-03 16:33:57
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? The /cloudsql/ sockets are only available in regular App Engine. Managed VMs are regular VMs so connection to Cloud SQL needs to use the external IP of that Cloud SQL instances.

App engine fails to connect to Google cloud sql

你离开我真会死。 提交于 2019-12-03 13:10:31
My Google app engine application fails to connect to Google cloud sql instance with this error: 'PDOException' with message 'SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. I've checked the documentation and followed instructions closely. I added the app as an authorised application and set the root password using the cloud console. I also gave the instace an ip address and can connect to it from Workbench on the local development machine. Using workbench, I added a user and configured permissions. But I'm still unable to connect to it from

Getting notAuthorized error with cloud_sql_proxy locally

时光怂恿深爱的人放手 提交于 2019-12-03 12:31:52
I'm trying to setup a connection locally for 2nd generation cloud sql instance. Call for the proxy is ./cloud_sql_proxy -dir=/cloudsql -instances=status-1268:us-central1:status-dev=tcp:3306 & mysql -u status_stg --host 127.0.0.1 I am a bit unclear on how to set up correctly the service accounts from the API section, so I tried with both of the defaults, App engine default service account and Compute engine default service account. I also created a new one service account. For each one of them I assigned the service account ID to be Editor and Owner from the manage permissions section. Perhaps