I’m trying to set-up WordPress to run on Google App Engine.
I’m following the docs over here with MAMP as my local dev environment. The app runs okay through the GAE Launcher, but when I browse the localhost:PORT, I get:
Error establishing a database connection
I’ve tried changing the define('DB_HOST','localhost');
value to localhost:3306
(my MAMP MySQL port), 127.0.0.1
, and even the socket address (:/Applications/MAMP/tmp/mysql/mysql.sock
) – but I can’t get past the database connection error.
I’m wondering if I have misinterpreted the instructions. I originally thought that the database name, username and password were just placeholders that one was supposed to customize, both in Step 3 (create database and user) and 4 (edit config file). But, hoping I could run it remotely on App Engine, I looked at their sample SQL they use to set up the database and they’re using the generic terms (wp_user, wp_password) in their SQL stored in Cloud Storage. Does anyone know what is the correct procedure?
I’m seriously stuck. Can someone help?
Try the following:
Remove the
**
fromDB_NAME
,DB_USER
andDB_PASSWORD
, i.e. use:When you create your user in MySQL, make sure you use the
@localhost
terminology as shown.If all else fails, start with WordPress 3.5.1.
I found a better way of creating a database by following this video by Google Developers.
If you use MAMP, go to terminal and type
Once you login, you can follow the rest of the instructions as follows.
I don’t know if you still have this issue, but this is an issue of where the app SDK is looking for the file MYSQL sockets file (mysql.sock). I’m not sure where whether you can configure this somehow, but this worked for me since the default folder that the SDK looks for the file is /tmp:
If you simply link the MAMP sockets files to the one that google’s app engine expects locally, it works. 🙂