google-cloud-sql

Google Cloud SQL and time zones

家住魔仙堡 提交于 2019-12-12 12:29:25
问题 I'm developing an app that meant to run only in Israel . All of our tables contains times at Israeli time ( Tel Aviv time). because the SQL in GCP doesn't support default timezone and time zone convert I got stuck. how can I convert times between time zones? let me remind you that Israel has a light saving time change. 回答1: Now you have the ability to set the time zone in Cloud SQL. See https://cloud.google.com/sql/docs/mysql-flags. The limitation is that the time zone needs to be specified

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

删除回忆录丶 提交于 2019-12-12 08:24:26
问题 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

Query stays “statistics” state for long time in Google Cloud SQL (MySQL 5.5)

那年仲夏 提交于 2019-12-12 06:45:20
问题 Some queries stays "statistics" state for long time in my Google Cloud SQL Database. (MySQL 5.5) After this post, I changed optimizer_search_depth to 0. But some queries still have long statistics time. > select @@optimizer_search_depth; +--------------------------+ | @@optimizer_search_depth | +--------------------------+ | 0 | +--------------------------+ > show processlist; +----+------+-----------+------+---------+------+------------+-----------------+ | Id | User | Host | db | Command |

PDOException' with message 'SQLSTATE[HY000] [2002] Connection timed out' when trying to connect to google cloud sql

。_饼干妹妹 提交于 2019-12-12 06:26:25
问题 Hie members so I was trying to connect to Google cloud sql from an external site I authorized the ip of the server in google cloud at Instance -> Access Control -> Authorization and the instance also has been assigned an IP lets say 'X.X.X.X', and a user also has been created with User name 'username' and password 'password' now the connection code for connecting google cloud sql I used is as follows $db = new pdo('mysql:host=X.X.X.X;dbname=db','username','password'); and I tried opening the

Cloud Sql Instance restart hanging for hours

时光毁灭记忆、已成空白 提交于 2019-12-12 04:24:19
问题 My cloud sql instance became unresponsive today (unable to connect using my normal credentials via mysql-client or the google cloud console) so I decided to restart it to see if that would help, since I couldn't find any better debug suggestions. That was over two hours ago and the db still shows as restarting in my cloud sql dashboard. Others that had this issue were told to email cloud-sql@google.com but it's been over an hour already with no response. I wonder if trying to kill the

hibernate configuration for app engine

巧了我就是萌 提交于 2019-12-12 03:01:11
问题 how to configure hibernate.cfg.xml for accessing cloud sql as well as local mysql instance? following code worked in JDBC,I need such a configuration in hibernate. if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) { // Load the class that provides the new "jdbc:google:mysql://" prefix. Class.forName("com.mysql.jdbc.GoogleDriver"); url = "jdbc:google:mysql://your-project-id:your-instance-name/guestbook?user=root"; } else { // Local MySQL instance to use

Managed VM not running Cloud SQL Proxy

萝らか妹 提交于 2019-12-12 02:17:18
问题 Launching a Managed VM with a Java application, the following appengine-web.xml <?xml version="1.0" encoding="utf-8"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>thmadmin-ben</application> <version>master</version> <threadsafe>true</threadsafe> <vm>true</vm> <manual-scaling> <instances>1</instances> </manual-scaling> </appengine-web-app> I don't appear to have a Cloud SQL proxy running on the managed VM. Do I need to add an app.yaml file or define something

Google Cloud SQL CPU Monitoring

馋奶兔 提交于 2019-12-12 01:46:22
问题 I'm working on trying to setup some monitoring on a Google Cloud SQL node and am not seeing how to do it. I was able to install the monitoring agent on my Google Compute Engine instances to monitor CPU, Network, etc. I have not been able to figure out how to do so on the Cloud SQL instance. I have access to these types of monitoring: Storage Usage (GB) Number of Read/Write operations Egress Bytes Active Connections MySQL Queries MySQL Questions InnoDB Pages Read/Written (pages/sec) InnoDB

500 Error when Migrating Wordpress to Google Cloud

拈花ヽ惹草 提交于 2019-12-12 01:15:04
问题 Yesterday I spent my Sunday (almost) migrating my Wordpress install to Google Cloud following their wordpress setup tutorial. I've not come to the point that I need help, I've got caught up by 500 errors when test submitting the subscribe form: http://v-sons.appspot.com/wtf/#subscribe Being new to GCE I don't really know how it works, but I managed to work out some other 404 errors when I migrated fonts and videos over because I needed to include the filetypes in the app.yaml. I added: - url:

Severe delays in cloud SQL responses

蓝咒 提交于 2019-12-12 01:10:10
问题 In the past 4-5 hours there have been 10s of simple read queries that took 40-70 seconds to return result from the cloud SQL DB. Usually they take 50ms or so. Is there some ongoing issue? I can provide DB IDs and specific times if needed. Thanks. 回答1: Between 11.00PST and 11.30PST there was an issue that interrupted many Cloud SQL instances. The problem should now be resolved. We apologize for the inconvenience and thank you for your patience and continued support. Please rest assured that