Friday, February 12, 2016

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

Hi

I have the same issue when I tried to install wordpress to app engine.
I have followed all steps at https://googlecloudplatform.github.io/appengine-php-wordpress-starter-project/
And, everything local works well, and I can even deploy successfully, however, when I tried to install wordpress on app engine by
http://<project_id>.appspot.com/wp-admin/install.php
I get an error page saying 
"

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>:testsqlv1. This could mean your host's database server is down.

.....

    "

    if I try http://<project_id>.appspot.com, I get page showing:

    "

    Error establishing a database connection

    "

    I first tried second gen, and then first gen, none works for me.

    I have app.yaml modified with <project_id> at the first line of the file
    and I have wp-config.php modified with db name, db host, username password, etc.

    I use root with empty password.

    I also connect into mysql using instance IP and create database, say, 'wp_wordpress', 

    It took me a whole day, and still the error page when I tried to install wordpress on app engine.

    Can anyone help me on this issue?

    Thanks a lot in advance

    Hai


    On Saturday, January 23, 2016 at 10:23:26 PM UTC-5, 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/9e7175b3-bded-4500-ae99-c5eeaa1a9c37%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

    No comments:

    Post a Comment