Please consider the environment before printing this email.
This e-mail and any attachments to it (the "Communication") is, unless otherwise stated, confidential, may contain copyright material and is for the use only of the intended recipient. If you receive the Communication in error, please notify the sender immediately by return e-mail, delete the Communication and the return e-mail, and do not read, copy, retransmit or otherwise deal with it. Any views expressed in the Communication are those of the individual sender only, unless expressly stated to be those of National Training and Solutions Provider Pty Ltd ABN 34 123 831 023, or any of its related entities. NTSP does not accept liability in connection with the integrity of or errors in the Communication, computer virus, data corruption, interference or delay arising from or in respect of the Communication.
Hi Salim,
Depending on your environment, you have several options available to you in the following link for connecting to your Cloud SQL instance. As in the subsection “Configure access to your Cloud SQL instance”, you may have to authorise the IP address of the client machine where your MySQL client is installed.
To answer your question about setting up the DB_HOST variable, again depending on your environment(Wordpress site hosted on Google App Engine) you may be able to fix your redirect issue by setting it to ':/cloudsql/[YOUR_PROJECT_ID]:[Instance Region]:[Instance name]' as in the following “Setting up the WordPress project” link.
Alternatively, it is possible that the redirect can be caused by a plugin within the Wordpress environment. In that case, the best remedial action is to test each plugin individually after disabling them all.
In case none of the previous solutions works, please provide the following information about your set up:
- The generation of the Cloud SQL instance that you are using
- Where you are hosting your Wordpress Site
- The exact value of the DB_HOST that you have set
- Which version of MySQL are you using
--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/ad50845f-ebb4-4033-8656-01223eb16ec5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi again,
Thanks for providing details about your environment. Still, I was unable to reproduce your error using a similar setup to yours, mainly consisting of a WordPress website hosted on Compute Engine and linked to a MySQL database on Cloud SQL.
For the reproduction, I used the Cloud Launcher to launch a WordPress solution. After importing a “dump.sql” file (from MySQL database of the WordPress Solution) to a first generation Cloud SQL instance, I followed this guide to successfully connect my WordPress website to the transferred database.
Important steps to note:
1. Generate an IPv4 address on both instances(static IPv4 on GCE) and authorise the one form GCE to connect to the Cloud SQL instance.
2. Create a user account on the Cloud SQL instance under the Access Control tab and set the “Host name” to the GCE’s instance static IPv4 or to “Allow any host (%)” for testing purposes.
3. Edit the wp-config.php file in the \var\www\html directory of the Wordpress site on the GCE instance with DB_HOST set to ‘[Cloud SQL Generated IPv4 address]’, and the other variables matching your newly created user and uploaded database name on the Cloud SQL instance.
Note that you can test your Cloud SQL database connection from the GCE instance through SSH on the instance menu and running the GCloud command “mysql --host=[Cloud SQL Generated IPv4 address] --user=[Created User] --password”. This way you can make sure that the uploaded database on Cloud SQL is reachable after having configured a new user, all the IPv4 addresses and authorisation steps. More information can be found on this link.
Concerning the redirect issue, it may be caused by a misconfigured Apache server and so you may want to use external tools such as this one to identify what is causing it.
Let me know if those tips help you to connect to the Cloud SQL database and if you need any additional clarification.
--
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+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/a65b4b00-cee3-4b34-ac65-9e9ab9c60d1f%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/a65b4b00-cee3-4b34-ac65-9e9ab9c60d1f%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-cloud-sql-discuss/pgTB5n-kfbo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-cloud-sql-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAJZK_bbC37TaPxabkN5-84_ewOERcBzzsL%3DAZQuQUKS-RK235Q%40mail.gmail.com.