WordPress Cloud SQL Proxy Issue With Persistent Connection

46 views
Skip to first unread message

Mervinlee Tan

unread,
Mar 4, 2018, 1:54:52 PM3/4/18
to Google Cloud SQL discuss

Hi,


I made a WordPress instance on compute engine and attempted to set it up with Cloud SQL via Cloud SQL Proxy. I've successfully managed to build the connection as I verified it via 'mysql -u myUser -p -h 127.0.0.1' and connected to the database.


However, the issue comes when I refresh the WordPress website. Everytime I try to load the website (literally just typed and pressed enter via the browser), the terminal shoots out 'Client closed local connection on 127.0.0.1:3306' and then the website fails to load fully having broken links and images.


Can you provide a possible fix for this? Whenever I use the 'mysql' command, it works fine and the connection is not dropping. However, if it's the website itself, I'm encountering this issue.


Any inputs will be greatly appreciated!

Digil (Google Cloud Platform Support)

unread,
Mar 4, 2018, 7:50:27 PM3/4/18
to Google Cloud SQL discuss
It looks like you have followed this documentation for Connecting MySQL Client from Compute Engine (using the Cloud SQL Proxy). Now, you might also need to check this general troubleshooting guide for 'Cloud SQL Proxy connection' and 'Diagnosing Issues' with Cloud SQL Instances for additional reference on your concern. Let me know if that helps you.

Mervinlee Tan

unread,
Mar 7, 2018, 2:50:21 AM3/7/18
to Google Cloud SQL discuss
Hi Digil,

We've actually used those documentation and followed it through. Just yesterday, we have already solved the issue by giving root database access to the database username we're using. Thank you for your response and I'll close this topic.
Reply all
Reply to author
Forward
0 new messages