google-cloud-sql

Local MySQLdb connection fails with AttributeError for paramstyle when running GAE development server

感情迁移 提交于 2019-12-03 09:27:40
I'm building a GAE Flask application with Flask-Alchemy, against Cloud SQL, and running dev_appserver to test the application as I build it. However, if I set the SQLALCHEMY_DATABASE_URI to a mysql+gaerdbms:///appname?instance=instanceid URL, I get the following traceback when trying to call db.create_all() : Traceback (most recent call last): # earlier lines omitted for brevity File "/Project/app/foo.bar/foo/bar/admin/__init__.py", line 26, in init_db db.create_all() File "/Project/app/distlib/flask_sqlalchemy/__init__.py", line 856, in create_all self._execute_for_all_tables(app, bind,

Deploying database on Google Cloud Storage in Android application

前提是你 提交于 2019-12-03 06:26:21
问题 In my android application I want to store images from my Android application to Google Cloud Storage. For that I'm referring to this Mobil Backend starter example. In that they have a backend database which is deployed on Google Cloud Storage, but I don't know I can deploy my own database there. What are the steps to query the database in my android app? Please help me to implement this functionality. Can anyone suggest a tutorial or link which provides proper guidelines for using and storing

Google Cloud SQL: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0

筅森魡賤 提交于 2019-12-03 04:38:59
问题 I'm desperate since my Google Cloud SQL instance went down. I could connect to it yesterday without problem but since this morning i'm unable to connect to it in any way, it produces the following error: The database server returned this error: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0 This is what I did to try to fix this: restart instance added authorized ip-addresses in CIDR notation reset root password restored backup

How to connect Google Cloud SQL from Cloud Functions?

放肆的年华 提交于 2019-12-03 03:08:07
问题 I am trying to use Cloud Functions for Firebase to build an API that talks with a Google Cloud SQL (PostgreSQL) instance. I am using HTTP(S) trigger. When I white-list my desktop's IP address, I can connect to the Cloud SQL with the function's node.js code from my local machine. But when I deploy, I can't connect, and I can't figure out the HOST IP address of Firebase Function's server, to white-list. How do you talk to Google Cloud SQL from Cloud Functions for Firebase? Thanks! // Code

How to create database on google cloud sql instance

ε祈祈猫儿з 提交于 2019-12-03 00:33:44
How can I use Cloud SQL to create a database? When I use MySQL, I could easily run a sql script to create them on phpMyAdmin. I found a site that advertises that it's possible to run SQL files right on Google Cloud SQL. This is exactly what I want to do. I could run my code to create a couple databases, and they would be in my cloud SQL, and I could connect my appengine app to my cloudsql and it would work as expected. But when I follow the instructions on that site, I only see this: Where is the SQL prompt? How can I create databases on my cloud sql instance? IanGSY As @Juan Enrique Muñoz

Deploying database on Google Cloud Storage in Android application

妖精的绣舞 提交于 2019-12-02 20:59:56
In my android application I want to store images from my Android application to Google Cloud Storage. For that I'm referring to this Mobil Backend starter example. In that they have a backend database which is deployed on Google Cloud Storage, but I don't know I can deploy my own database there. What are the steps to query the database in my android app? Please help me to implement this functionality. Can anyone suggest a tutorial or link which provides proper guidelines for using and storing DB on Google Gloud? Thank you. If you are writing your own App Engine application that needs to use

Google Cloud SQL is slow

孤街浪徒 提交于 2019-12-02 20:28:50
I have a D0 size Cloud SQL instance. When I run a simple select * from table which has around 500 rows, it takes on average 100 ms to execute (as reported by SQL Prompt). Whereas on my local instance of MySQL 5.5, it takes only 1 ms. My dev machine has 2.9GHz dual-core Intel Core i7 and 8GB 1600MHz memory. I've read in an FAQ that performance of db depends on the size - larger instances have more RAM and CPU. Is this reasonable to expect performance issues resolved with larger instance size? Or am I missing something else here? andriys Views were the cause of poor performance. Google runs

Google Cloud SQL: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0

折月煮酒 提交于 2019-12-02 17:47:36
I'm desperate since my Google Cloud SQL instance went down. I could connect to it yesterday without problem but since this morning i'm unable to connect to it in any way, it produces the following error: The database server returned this error: SQLSTATE[HY000] [2013] Lost connection to MySQL server at 'reading initial communication packet', system error: 0 This is what I did to try to fix this: restart instance added authorized ip-addresses in CIDR notation reset root password restored backup pinged the ip-address and I get response All these actions completed but i'm still unable to connect

node-mysql pool experiences ETIMEDOUT

做~自己de王妃 提交于 2019-12-02 15:23:39
问题 I have a node-mysql pool configuration of var db_init={ host : 'ip_address_of_GCS_SQL', user : 'user_name_of_GCS_SQL', password : 'password here', database : 'db here', supportBigNumbers: true, connectionLimit:100 }; Pool was created using GLOBAL.db_foobar = mysql.createPool(db_init); I basically just left the connection on for a couple of hours and I saw this error reported by my connection.query Request (after getConnection of course): prodAPI-104 (out): { status: 'Error', prodAPI-104 (out)

How to connect Google Cloud SQL from Cloud Functions?

被刻印的时光 ゝ 提交于 2019-12-02 15:11:37
I am trying to use Cloud Functions for Firebase to build an API that talks with a Google Cloud SQL (PostgreSQL) instance. I am using HTTP(S) trigger. When I white-list my desktop's IP address, I can connect to the Cloud SQL with the function's node.js code from my local machine. But when I deploy, I can't connect, and I can't figure out the HOST IP address of Firebase Function's server, to white-list. How do you talk to Google Cloud SQL from Cloud Functions for Firebase? Thanks! // Code Sample, of what's working on Localhost. var functions = require('firebase-functions'); var pg = require('pg'