2nd generation Google cloud SQL - application engine

Glad to see you released the second generation SQL cloud in beta. However, I see that it is not yet available for GAE projects. Can you evaluate when this link will be included? We are making some big infrastructure changes in our fantastic system, caused by the slow generation of SQL 1, but we will stick to cloud-based SQL if the change is just around the corner.

+5
source share
2 answers

You can now connect to second-generation Google Cloud SQL instances from App Engine applications. The connection string is slightly different from first-generation instances (docs) .

  • Open the SQL instance in the cloud console.
  • In the properties, copy "Instance Connection Name". Note that this is different from the "name" of your instance and will probably be in the format of project:region:instance .
  • For user interfaces, it’s normal to say β€œNo” for authorized applications - you can still connect to GAE. Note. The SQL application and GAE application must be part of the same project.
    Update. You do not need to be in the same project, you need to provide access if they are not in the same project. Link: https://cloud.google.com/sql/docs/dev-access#gaev1-csqlv2-access

screenshot

PHP Connection Code Example:

 $con = "mysql:unix_socket=/cloudsql/CONNECTION_STRING_FROM_CONSOLE;dbname=some_db"; $this->db = new pdo($con, "root", ""); $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); 
+2
source

As of April 27, 2016, the second generation connection to the App Engine is supported.


OLD :

The Cloud SQL team is actively working on adding App Engine support for Second Generation instances. Unfortunately, I can’t talk about specific dates, but we hope to make it available as soon as possible.

+6
source

Source: https://habr.com/ru/post/1238939/


All Articles