Deploying and Using Cloud SQL in GAE

2 views
Skip to first unread message

Herman via StackOverflow

unread,
Jul 8, 2016, 1:54:04 AM7/8/16
to google-appengin...@googlegroups.com

You are using appengine? Make sure you have authorized your appengine process in the Access Control tab of the instance. In all your examples, they are all Instance connection name of your instance after "/cloudsql/". You can find that in your instance details page. For a v1 instance, the format is :. For a V2 instance, the format is ::.



Please DO NOT REPLY directly to this email but go to StackOverflow:
http://stackoverflow.com/questions/38257866/deploying-and-using-cloud-sql-in-gae/38259761#38259761

Franz Noel via StackOverflow

unread,
Jul 8, 2016, 2:39:04 AM7/8/16
to google-appengin...@googlegroups.com

I'm trying to install Wordpress using this Mac version. I was able to deploy it locally using the following settings:

define('DB_NAME', 'db_name');
/** Local environment MySQL login info */
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', 'whatever');

However, when I tried to deploy it using Cloud SQL, I can't seem to figure out the correct settings.

In the DB_HOST, I have tried the following:

  • :/cloudsql/project-id:custom-db-instance
  • :/cloudsql/project-id:region:custom-db-instance
  • :/cloudsql/project-id:wordpress
  • :/cloudsql/project-id:region:wordpress
  • IP address of Cloud SQL Server

Using app.yaml, I have set app.yaml env_variables to the following:

  • MYSQL_DSN: mysql:unix_socket=/cloudsql/INSTANCE_CONNECTION_NAME;dbname=DATABASE
  • MYSQL_USER: root
  • MYSQL_PASSWORD: ''

I'm wondering what is the real setting because the documentation does not seem unified. Here are the documentation I read:

Reply all
Reply to author
Forward
0 new messages