Wednesday, October 18, 2017

[google-cloud-sql-discuss] Re: Issues connecting to Google Cloud SQL for wordpress

Are you using a Second Gen or First Generation instance? If second generation, try the response from Kathryn Beals

On Wednesday, October 11, 2017 at 6:03:19 AM UTC-7, Fenny Low wrote:
Everything is correct in my wp-config with sql instance, db details and all. Still getting the 

Error establishing a database connection 

when accessing from web browser. 
No error access cloud_sql_proxy with authentication.

Please help :(
Thank you.


On Monday, April 3, 2017 at 8:44:50 PM UTC+8, Reuben Sterling wrote:
Thank you! Adding the region and the password worked for me too. Is that described in documentation somewhere or did you figure it out? 

On Monday, October 24, 2016 at 6:53:07 AM UTC-7, Kathryn Beals wrote:
If you're using a second-gen Cloud SQL instance, you need to include the full instance connection name (including region), e.g. your-project-name:us-central1:wordpress, as well as the root password for your Cloud SQL instance. That worked for me...

On Saturday, January 23, 2016 at 7:23:26 PM UTC-8, NP wrote:

I'm trying to host a wordpress blog on google app engine (GAE). I am following the steps outlined on the link below

http://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/

I have created my project, deployed it, created an SQL instance and also created a database using the steps outlined in the link above (Note: I can't see the databases directly on Google Cloud SQL but when I query it from my console, I can see it).

One of the steps in the link above says to navigate to http://.appspot.com/wp-admin/install.php

When I do that, I get the following error

Error establishing a database connection  This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at :/cloudsql/<PROJECT_ID>:production. This could mean your host's database server is down.

Please note that 'production' is my SQL instance name. I had earlier tried 'wordpress' as recommended in the starter-project but deleted it when i had issues and I'm unable to reuse it.

I also noticed that the Google Cloud SQl window has the following entry

Instance connection name     <PROJECT_ID>:us-central1:production

i.e. it automatically appended the location to my project id and instance name. So I tried using that in my config.php file in the place where it said to use ':/cloudsql/your-project-id:your-instance-name' but that still doesn't solve the problem.

Anybody have a solution?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/dafaa797-f074-4e51-9d7c-80d5d9ef2988%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment