Home:ALL Converter>Connecting Wordpress on Google Cloud Compute to CloudSQL DB

Connecting Wordpress on Google Cloud Compute to CloudSQL DB

Ask Time:2016-07-12T01:47:03         Author:DarkMatter

Json Formatter

Ive tried and tried to get this to work to no avail.

I have WordPress running on Google Computer Engine, and I have my database on Google CloudSQL. Both are in the same project, and I have managed to connect to MySQL via the CloudSQL Proxy with:

./cloud_sql_proxy -dir=/cloudsql -instances=[CLOUDSQL INSTANCE CONNECTION] & mysql -u [CLOUDSQL USER] -S /cloudsql/[CLOUDSQL INSTANCE CONNECTION]

This brings up the mysql command where I can show my databases in that remote connection.

I am not sure if I need to put something in my wp-config.php file to pick up on the CloudSQL Database or what.

I already have the scope set to allow CloudSQL access, and I am able to actually connect from GCE over to the CloudSQL DB, but I am not sure how to get wordpress to access the DB.

I saw this here: Connecting Google Cloud SQL with Wordpress on Google Compute Engine But it didn't help me because I wasn't sure exactly what needed to be done.

I would be EXTREMELY greatful for any help.

Author:DarkMatter,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/38313122/connecting-wordpress-on-google-cloud-compute-to-cloudsql-db
yy