google-cloud-sql

Why does manage.py syncdb fail to connect to google cloud sql database?

对着背影说爱祢 提交于 2020-01-03 17:12:39
问题 During a recent update of an app on Google App Engine I was in the process of updating the database with: SETTINGS_MODE='prod' ./manage.py syncdb This worked last time I ran it, but now I am getting the following error: Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/Library/Python/2.7/site

Why does manage.py syncdb fail to connect to google cloud sql database?

﹥>﹥吖頭↗ 提交于 2020-01-03 17:12:08
问题 During a recent update of an app on Google App Engine I was in the process of updating the database with: SETTINGS_MODE='prod' ./manage.py syncdb This worked last time I ran it, but now I am getting the following error: Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/Library/Python/2.7/site

Why does manage.py syncdb fail to connect to google cloud sql database?

吃可爱长大的小学妹 提交于 2020-01-03 17:12:01
问题 During a recent update of an app on Google App Engine I was in the process of updating the database with: SETTINGS_MODE='prod' ./manage.py syncdb This worked last time I ran it, but now I am getting the following error: Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line utility.execute() File "/Library/Python/2.7/site

How to calculate the diskspace used by MySQL table from column datatypes and number of rows?

只愿长相守 提交于 2020-01-03 05:01:06
问题 I have a MySQL table with more than a 3 billion rows hosted on Google Cloud SQL. I wish to understand how the total size on disk can be explained from the column data-types, number of rows and the indexes. I was hoping that it would be something like size_of_table_in_bytes = num_rows * [ Sum over i {bytes_for_datatype_of_column(i))} + Sum over j {Bytes_for_index(j)} ] But I end up with incorrect disk-size than how much my database size shows. Using bytes per datatype on https://dev.mysql.com

How to connect from a pool of Google Compute Engine instances to Cloud SQL DB in the same project?

心已入冬 提交于 2020-01-03 02:55:10
问题 If I have a pool of Compute Engine instances (behind a load-balancer with a static IP), and I want to connect from Java apps on these instances to a Cloud Sql database in the same project, what's the way to about it? 1) These instances in the load balancer don't have static external IPs, so I can't authorize access to Cloud SQL by IP addresses. 2) "com.mysql.jdbc.GoogleDriver" is not available on Compute Engine, as it is on App Engine. 3) If I try to use the stock MySql JDBC driver, it doesn

ssl connection working in MySQL Workbench, but not in DBeaver

做~自己de王妃 提交于 2020-01-03 00:54:29
问题 I am getting an 'access denied' error trying to connect to a Google Cloud SQL MySQL instance with ssl in DBeaver. I am able to connect to the server with the same ssl credentials in MySQL Workbench connect without ssl credentials (through user name / password) in DBeaver. Any suggestions why this might be? 回答1: You can add connection with SSL support, at least in latest version for today (5.1). Create connection as usual, then skip testing and go to next step, then on SSL tab select "Require

How to create database on google cloud sql instance

ε祈祈猫儿з 提交于 2019-12-31 16:35:21
问题 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

Cloud SQL instance connection working locally, but not on App Engine

感情迁移 提交于 2019-12-30 10:32:45
问题 I am trying to host an API implemented as a Node.js app on Google Cloud App Engine. The database that the API utilizes is a PostgreSQL 9.6 database which is hosted with a Cloud SQL instance. The database is connected to the Node.js API through Knex . When hosted on App Engine, the API endpoints that do not require any contact with the database work fine. However, when the database needs to be contacted to complete the API call, the following error appears in the logs: Unhandled rejection

Cloud SQL instance connection working locally, but not on App Engine

前提是你 提交于 2019-12-30 10:32:40
问题 I am trying to host an API implemented as a Node.js app on Google Cloud App Engine. The database that the API utilizes is a PostgreSQL 9.6 database which is hosted with a Cloud SQL instance. The database is connected to the Node.js API through Knex . When hosted on App Engine, the API endpoints that do not require any contact with the database work fine. However, when the database needs to be contacted to complete the API call, the following error appears in the logs: Unhandled rejection

Cloud SQL instance connection working locally, but not on App Engine

对着背影说爱祢 提交于 2019-12-30 10:31:12
问题 I am trying to host an API implemented as a Node.js app on Google Cloud App Engine. The database that the API utilizes is a PostgreSQL 9.6 database which is hosted with a Cloud SQL instance. The database is connected to the Node.js API through Knex . When hosted on App Engine, the API endpoints that do not require any contact with the database work fine. However, when the database needs to be contacted to complete the API call, the following error appears in the logs: Unhandled rejection