google-cloud-sql

Cannot access google cloud SQL from google container engine

穿精又带淫゛_ 提交于 2019-12-08 17:24:26
问题 I'm still having problems accessing the cloud SQL instance from a GCE container. When I try to open up mysql, I get the following error: ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0 The connection works fine from my local machine, though (The instance has a public IP and I have added my office's IP to the 'allowed Networks'). So, the instance is accessible through the internet just fine. I guess the db's access control is

Google cloud sql with php

梦想与她 提交于 2019-12-08 10:05:10
问题 I'm having a problem to connect my DB cloud sql with php. I've tried every possible way to connect (pdo, mysqli & mysql) none of them worked. I've put an IPv4 for the could sql instance and authorized the compute engine IP in the allowed networks section. When I'm trying to connect from the compute engine with mysql --host=cloud_sql_IP --user=my_user --password it's working and I'm able to see the tables. On the php side I've put this code: $db = mysql_connect(<CLOUD_SQL_IPV4>, 'root', '');

Connecting a Google Cloud SQL Postgres Database to Google Data Studio

强颜欢笑 提交于 2019-12-08 10:01:05
问题 I am going through the exact same process as the answered question found here (Connect a Google CloudSQL Postgres database to Data Studio), but I am not as advanced a user as most. I am encountering a similar problem to what was mentioned in the above question, and then some: I have created a client certificate and downloaded the client-cert.pem, client-key.pem and the server-ca.pem files to my local machine. I received the same error when attempting to link Data Studio to our Google Cloud

1 big Google Cloud SQL instance, 2 small Google Cloud SQL instances or 1 medium + 1 replica?

落花浮王杯 提交于 2019-12-08 09:56:56
问题 I've started to use Google Cloud SQL and I need to improve my IOPS and network speed. I've seen that this it's only possible improving the type of machine and/or improving the size of disk. And this is my question. In my case, I need to migrate 2 MySQL databases (from 2 different projects) and I don't know what is better: 1 big instance with 2 databases? 2 small instances with the database in each instance? or 1 regular instance + 1 read replica instance? Thank you in advance! 回答1: The answer

MySQL SPs and Events being automatically rolled-back by Google Cloud SQL

試著忘記壹切 提交于 2019-12-08 09:01:41
问题 I have migrated my production MySQL schema to Google Cloud SQL. Various modifications have been necessitated to existing Stored Procedures & Scheduled Events, and some new ones deployed. HOWEVER, I have been noticing that where I leave everything working at 6PM, by the time I arrive back at my desk next morning, many (all?) SP & Event alterations are rolled back to some earlier state to development, and all my routines are failing or going crazy. The Data itself does not appear to be affected

Connect a Google CloudSQL Postgres database to Data Studio

独自空忆成欢 提交于 2019-12-08 08:27:12
问题 I am trying to connect a Postgres database hosted in a google Cloud Sql instance to Data Studio. I have followed the instructions (found here https://support.google.com/datastudio/answer/7288010) but to my disappointment, I still cannot connect to the database from Data Studio. I think the problem lies with the SSL connection, as if I enable "non-secure connections" in the options in CloudSql I can successfully connect from Data Studio. I have created the 3 files required for the ssl

JPA with Google Cloud SQL “NoClassDefFoundError: java.util.prefs.Preferences is a restricted class”

假装没事ソ 提交于 2019-12-08 08:19:36
问题 I am using JPA with GAE/Google Cloud SQL, and have set up everything according to the Google documents. I am able to browse my JPA Entities in Eclipse, and the app runs fine, except when I try to do: EntityManager em = EMF.get().createEntityManager(); Inside EMF, I do: private static final EntityManagerFactory emfInstance = Persistence.createEntityManagerFactory("MyApp"); ...and that's what causes the errors. Is this the right way to acquire the EntityManagerFactory? Below is the traceback. I

Problems installing Cloud SQL Proxy on Windows 64-bit

半腔热情 提交于 2019-12-08 08:15:40
问题 I'm trying to install Cloud SQL Proxy for Google Cloud Platform on my Windows 10 64 bit OS, so I can use Python scripts to dump data into SQL. I'm following this guide to get it set up. I created a project and a Google Cloud SQL instance from the Console without any issues, and it shows up in the SDK shell without any problems. After downloading the proxy installer and installing it, a dialog window opens up and then closes before I can read it. When I go to the Google Cloud SDK shell and try

How to connect datalab with Google Cloud SQL?

最后都变了- 提交于 2019-12-08 07:12:36
问题 Trying to connect from a datalab notebook with PostgreSQL database hosted on Google Cloud SQL. Try both direct IP and instance connection ways but both give us an exception. direct connection URI: "{engine}://{user}:{password}@{host}:{port}/{database}" using gcloud sql connect "{engine}://{user}:{password}@/{database}?host=/cloudsql/{instance_connection_name}" both give us this exception: OperationalError: (psycopg2.OperationalError) could not connect to server: Connection timed out Is the

Failed to import gs://bucket_name/Cloud.sql

∥☆過路亽.° 提交于 2019-12-08 05:58:03
问题 I have stored everything needed for my database in phpmyadmin , and exported the my database from it. That was saved as Cloud.sql , so now this sql file I imported it to the Google Cloud Storage with the help of this link https://developers.google.com/cloud-sql/docs/import_export. Now after importing the Contents of .sql using the Import option present in the action of the instance, it shows the green working sign , and after a while it stops, when I check in the Logs , it shows Failed to