Friday, March 31, 2017

[google-cloud-sql-discuss] Re: This is how I connect my Google instance VM to Cloud SQL/ And setup my Wordpress

Sorry I dont have much experience with that. I did what you asked me regarding to the hostname but got this error: 

Error establishing a database connection



Now regarding to this file I found this informations only inside it:

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
169.254.169.254 metadata.google.internal metadata


On Saturday, April 1, 2017 at 12:35:29 AM UTC+3, Adam (Cloud Platform Support) wrote:
The 'hostname' portion of the FQDN is not your external domain name. It is the host name of the machine you're connecting to. For example, if you created an instance called 'mysql-server' for your database, the FQDN would be:

mysql-server.c.ex-growth.internal

Before even trying to connect to a host, you should check that it's even correct first eg. by pinging it. You can also verify the hostname of a machine by SSHing into it and checking /etc/hosts, eg.

$ cat /etc/hosts

The IP and hostname will be listed as the last line of the output.

On Friday, March 31, 2017 at 5:03:47 PM UTC-4, Moh'd Irshaid wrote:
Hi Adam
You mean replace the DB_Host in the wp-config.php file with this exactly:

eystx.com.c.ex-growth.internal

Since the project id is: ex-growth
and the main domain is: eystx.com

I tried this but doesnt work .. 



On Friday, March 24, 2017 at 11:22:50 PM UTC+2, Adam (Cloud Platform Support) wrote:
One step better than connecting via public IP is to connect to the internal private IP address, as you'll have a faster network path and thus reduced latency and higher bandwidth between your app and your database. Using the internal DNS name is preferable to the IP address which can potentially change.

However, you're still limited to a single application instance and a single database instance. If your user traffic increases past the point that a single instance can handle, you'll be in trouble. This is where App Engine is useful, as it can scale out multiple instances of your application on demand to respond to changes in traffic.

There are many solutions to the problem of scaling though, and App Engine is just one of them. It can also be done on Compute Engine using load balancing, managed instance groups, and autoscaling. Yet another solution is Google Container Engine, which uses Docker containers with Compute Engine resources to scale out.

On Friday, March 24, 2017 at 11:23:47 AM UTC-4, Moh'd Irshaid wrote:
Hi,
I've decided to move from normal hosting companies to Google cloud and run my own server; most of my websites are WordPress. but I want to make sure that what I've done is right .. its working until now! but not sure if it is the best thing to do;

I've created my VM instance;
I've installed vesta cpanel.

But for databases I dont want to host it in the same instance! so under the same project I've created SQL instance,

I connect it to my local MySql Workbench and its connected and worked. 

then in Wordpress wp-config.php file

Username and Password used the same for my sql instance
host i change it from the localhost and used the public ip address for my sql instance

its connected! but i don't know if this is the best solution, I'm taking exactly about the hostname

Please let me know, all videos i've found on internet is talking about google app engine, why? why not just hosting the code on the VM instance and the database on SQL instance then link it togather using the ip address? 


CONFIDENTIALITY STATEMENT: This communication is an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. sec. 2510. Its disclosure is strictly limited to the recipient(s) intended by the sender of this message. This transmission and any attachments may contain proprietary, confidential, attorney-client privileged information and/or attorney work product. If you are not the intended recipient, any disclosure, copying, distribution, reliance on, or use of any of the information contained herein is STRICTLY PROHIBITED. Please destroy the original transmission and its attachments without reading or saving in any matter and confirm by return email.


CONFIDENTIALITY STATEMENT: This communication is an electronic communication within the meaning of the Electronic Communications Privacy Act, 18 U.S.C. sec. 2510. Its disclosure is strictly limited to the recipient(s) intended by the sender of this message. This transmission and any attachments may contain proprietary, confidential, attorney-client privileged information and/or attorney work product. If you are not the intended recipient, any disclosure, copying, distribution, reliance on, or use of any of the information contained herein is STRICTLY PROHIBITED. Please destroy the original transmission and its attachments without reading or saving in any matter and confirm by return email.

--
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/871b2d58-10d9-4fda-ba0a-146e72fac85f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment