Thursday, October 29, 2020

[google-cloud-sql-discuss] Slow Cloud SQL performance from AppEngine

Hi All - I've posted this in the GAE group but thought there may be benefit of posting here as I'm not sure where the problem lies and don't want to eliminate Cloud SQL or it's config being the issue, and there's similar threads in the past.

At the moment I'm experiencing significantly slower Cloud SQL performance from AppEngine than I am from Cloud Run

I'm Testing whether to move away from AWS and which GCP solution to move to and have fired up instances of Cloud Run and AppEngine to test a NestJS API.
Having added logging to isolate just the time taken to query the DB as part of an API call, the same GET request that takes 400ms query time on average in Cloud Run takes 2100ms in AppEngine.
To clarify this is the same source, same build deployed to both and these are the times once warm so I'm excluding the first few requests.

Cloud SQL, AppEngine and Cloud Run are all set up in the same region (australia-southeast1), and connection from GAE and Cloud Run to Cloud SQL is for both via Private IP and Serverless VPC.

I added OpenTelemetry and the pg plugin to diagnose the pg component and can see that it's saying the raw query is about 3.5x on average (160ms vs 550ms) . I'm assuming that "pg.query:SELECT" is execution time + fetching time, and the issue likely lies in the fetching rather than execution but can't see how with the OpenTelemetry plugin I can isolate that.
I also output the query being executed to cloud logs to ensure that it's the same query on both.

I'm going to try via Public IP to see if this is some sort of Private and VPC issue, although docs say Private IP should be faster. Any other thoughts/suggestions on what this could be? 

--
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/e82f9f71-e4e5-43b1-8457-1df29f525eddn%40googlegroups.com.

[google-cloud-sql-discuss] Re: Google Cloud Platform - forward ports to multiple SQL instances

 IP traffic using private services access is never exposed to the public Internet. Therefore, attack vectors are limited. Also, private IP can provide lower network latency than public IP. If you try to connect external clients to the VPC, you defy its primary purpose. In any case, you can connect external clients to you Cloud SQL instances directly, as detailed on the "Connecting to Cloud SQL from external applications" documentation page

On Wednesday, 28 October 2020 at 14:55:38 UTC-4 Bas wrote:

I am running multiple SQL instances in Google Cloud Platform (GCP). I have multiple masters with some read-replicas. Each instance has a private IP-address based on the region it is in, all instances use the same stock MySQL port (3306).

In the same VPC I have a few compute engines that can connect to each of the SQL instance without any problems. But I also have a couple (10~15) clients that need to connect from outside the VPC, through the internet so to say.

The question is how can I forward certain ports to the right internal IP-address in my VPC? IE:

<public-ip>:12345 -> 10.x.x.1:3306
<public-ip>:23456 -> 10.x.x.2:3306
<public-ip>:34567 -> 10.x.x.3:3306  

I want to use a single firewall for the public-ip. If I set a public IP for each SQL instance I will need to set network access for each instance for each client. That is going to ge a nightmare quite fast.

--
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/f8d234b1-a390-4283-8d3e-67fc55018170n%40googlegroups.com.

Wednesday, October 28, 2020

[google-cloud-sql-discuss] Google Cloud Platform - forward ports to multiple SQL instances

I am running multiple SQL instances in Google Cloud Platform (GCP). I have multiple masters with some read-replicas. Each instance has a private IP-address based on the region it is in, all instances use the same stock MySQL port (3306).

In the same VPC I have a few compute engines that can connect to each of the SQL instance without any problems. But I also have a couple (10~15) clients that need to connect from outside the VPC, through the internet so to say.

The question is how can I forward certain ports to the right internal IP-address in my VPC? IE:

<public-ip>:12345 -> 10.x.x.1:3306
<public-ip>:23456 -> 10.x.x.2:3306
<public-ip>:34567 -> 10.x.x.3:3306  

I want to use a single firewall for the public-ip. If I set a public IP for each SQL instance I will need to set network access for each instance for each client. That is going to ge a nightmare quite fast.

--
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/95489507-882f-4597-8f4e-f592f9d97244n%40googlegroups.com.

Tuesday, October 27, 2020

[google-cloud-sql-discuss] Re: Connect to a Postgres CloudSQL instance Privately from a different VPC

Hello Dominic,

Have you looked at this documentation? It does involve the Cloud SQL Proxy but also refers to the proxy Docker image.

On Tuesday, October 27, 2020 at 12:21:42 PM UTC-4 dominic...@andela.com wrote:
Any ideas on how to approach this?

Using CloudSQL proxy is not an option for my case.

1. The VM is in the same project as the instance.
2. The CloudSQL instance is on a different network from the VM ( i.e VPC-a and VPC-b )
3. There's peering between the VPC-a and VPC-b e.g  VM instances can communicate via Private IP's

How can I connect to the CloudSQL instance from a VM instance on another VPC  in the same project using the internal IP addresses only?

Thanks,

--
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/093edf70-26ed-49fa-a4da-f60e58ce5efbn%40googlegroups.com.

Monday, October 26, 2020

[google-cloud-sql-discuss] Connect to a Postgres CloudSQL instance Privately from a different VPC

Any ideas on how to approach this?

Using CloudSQL proxy is not an option for my case.

1. The VM is in the same project as the instance.
2. The CloudSQL instance is on a different network from the VM ( i.e VPC-a and VPC-b )
3. There's peering between the VPC-a and VPC-b e.g  VM instances can communicate via Private IP's

How can I connect to the CloudSQL instance from a VM instance on another VPC  in the same project using the internal IP addresses only?

Thanks,

--
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/559c9f12-bc09-4ad6-9eb9-500a65f59348n%40googlegroups.com.

[google-cloud-sql-discuss] Postgres BigQuery federated access via private IP?

Hi all,

Would you please advise if BigQuery federated access is still possible for Postgres via private IP somehow? We do not want to create public IP (strict security policy) and still want to use federated queries with private IP...

I am aware that docs say: "BigQuery Cloud SQL federation only supports Cloud SQL instances with public IP connectivity",  https://cloud.google.com/bigquery/docs/cloud-sql-federated-queries , however any workaround without  creating public IP?


--
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/567ed112-0539-4d79-b6de-5e1a2af0094en%40googlegroups.com.

Friday, October 23, 2020

[google-cloud-sql-discuss] Re: Does Google Cloud SQL for PostgreSQL support user defined functions?

Cloud SQL instance is the same as the functionality provided by a locally-hosted PostgreSQL instance. there are a few differences between them.

Unsupported features
  • Any features that require SUPERUSER privileges

    An exception to this rule is made for the CREATE EXTENSION statement, but only for supported extensions.

  • Custom background workers

  • The psql client in Cloud Shell does not support operations that require a reconnection, such as connecting to a different database using the \c command.

Notable differences
  • There are some PostgreSQL options and parameters that are not enabled for editing as Cloud SQL flags.

    To request the addition of a configurable Cloud SQL flag, use the Cloud SQL Discussion group.


As user-defined functions (UDFs) generally be used to deal with huge amount of data, in GCP the BigQuery is the production that using simple SQL—in a fraction of the time. It supports the UDFs. I believe it could meet your requirements.
On Thursday, October 22, 2020 at 3:05:14 PM UTC-4 LiMing Lu wrote:

PostgreSQL allows you to extend the database functionality with user-defined functions by using various procedural languages, which are often referred to as stored procedures.

With stored procedures you can create your own custom functions and reuse them in applications or as part of other database's workflow.

Does Google Cloud SQL for PostgreSQL support user defined functions?

--
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/8c3614f3-6f98-472b-9835-b0eec54b5045n%40googlegroups.com.

[google-cloud-sql-discuss] Re: Importer base de données locale sous format excel


Using the Google Translate tool, I understand you are trying inquire about importing your Data to CloudSQL using a CSV file. If my understanding is right, I think you should look through this article[1]. I believe the information shared on the documentation explains the steps to follow to import your Data using an Excel File or a CSV file. 

[1]https://cloud.google.com/sql/docs/mysql/import-export/importing#csv
On Friday, October 23, 2020 at 7:09:20 AM UTC-4 llopis wrote:
Hello,

Thanks for posting your message on Google Groups! Please note that all future messages should be in English as it is our primary language for Google Groups, and our ability to help in a foreign language is limited.

I really appreciate your understanding and cooperation on this matter. 

On Friday, October 23, 2020 at 12:33:16 PM UTC+2 sensori...@gmail.com wrote:
Bonjour Ă  tous,

je dĂ©bute sous SQL et j'aimerai savoir s'il est possible - et comment on doit procĂ©der - pour utiliser un fichier excel comme base de donnĂ©es  pour l'exploiter via le terminal SQL de google ?

lorsque j'ai créér mon profil , on me demande de creer ma base de données ( ce que j'arrive) mais j'aimerai utiliser une base toute faite.

Pour info, j'utilise Google Cloud avec mon PC perso 

Merci Ă  tous pour votre aide.

Eric

--
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/23296ee4-d0b2-4d30-8b40-cbd9e7b4add6n%40googlegroups.com.

[google-cloud-sql-discuss] Re: Importer base de données locale sous format excel

Hello,

Thanks for posting your message on Google Groups! Please note that all future messages should be in English as it is our primary language for Google Groups, and our ability to help in a foreign language is limited.

I really appreciate your understanding and cooperation on this matter. 

On Friday, October 23, 2020 at 12:33:16 PM UTC+2 sensori...@gmail.com wrote:
Bonjour Ă  tous,

je dĂ©bute sous SQL et j'aimerai savoir s'il est possible - et comment on doit procĂ©der - pour utiliser un fichier excel comme base de donnĂ©es  pour l'exploiter via le terminal SQL de google ?

lorsque j'ai créér mon profil , on me demande de creer ma base de données ( ce que j'arrive) mais j'aimerai utiliser une base toute faite.

Pour info, j'utilise Google Cloud avec mon PC perso 

Merci Ă  tous pour votre aide.

Eric

--
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/e4789768-d236-453a-9961-6807a2fdf8b1n%40googlegroups.com.

[google-cloud-sql-discuss] Importer base de données locale sous format excel

Bonjour Ă  tous,

je dĂ©bute sous SQL et j'aimerai savoir s'il est possible - et comment on doit procĂ©der - pour utiliser un fichier excel comme base de donnĂ©es  pour l'exploiter via le terminal SQL de google ?

lorsque j'ai créér mon profil , on me demande de creer ma base de données ( ce que j'arrive) mais j'aimerai utiliser une base toute faite.

Pour info, j'utilise Google Cloud avec mon PC perso 

Merci Ă  tous pour votre aide.

Eric

--
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/f0d28ad0-4176-4f27-a3cd-b24443091429n%40googlegroups.com.

Thursday, October 22, 2020

[google-cloud-sql-discuss] Does Google Cloud SQL for PostgreSQL support user defined functions?

PostgreSQL allows you to extend the database functionality with user-defined functions by using various procedural languages, which are often referred to as stored procedures.

With stored procedures you can create your own custom functions and reuse them in applications or as part of other database's workflow.

Does Google Cloud SQL for PostgreSQL support user defined functions?

--
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/816a9c5f-31a4-446c-b117-f68621e57965n%40googlegroups.com.

Wednesday, October 21, 2020

[google-cloud-sql-discuss] Re: Cloud SQL Postgres Maintainence challenges

You choose a location when you first create the instance. The location can't be changed after the instance is created. Multi-regional backup locations may be chosen, but only for backup purposes. 

The option to choose your maintenance window is offered: you schedule maintenance at a selected day of the week and time, and the order that your instances are updated.

This discussion group is oriented more towards general opinions, trends, and issues of general nature touching the app engine. For coding and program architecture, as well as re-architecting your solution, you may be better served in dedicated forums such as stackoverflow, where experienced programmers are within reach and ready to help. 
On Tuesday, 20 October 2020 at 12:12:06 UTC-4 kishore Rvln wrote:
Current challenges: We are currently using Cloud SQL Postgres for Catalog, Promotions, Business configurations etc. Our back end application has dependency on Postgres stems from the fact that we have some tables which supports JSONB to support our discount structures. But Postgres has a serious drawback of having maintenance slots which are managed by Google and we never know when the maintenance will be performed. Even with read replicas this problem could not be averted. So we created another master, which is a clone of primary instance and weekly we do a manual backup restore to the clone. The master, master-replicas and the clone are load balanced with a ha-proxy.  

I am looking for a help and advise to address on the below use cases:
  1. Realtime data sync from one system  to another system.  Business users will be able to use these systems from multiple timezones. 
  2. Move existing catalog data, business config data, mapping tables and other general configuration tables to single data source
  3. Rearchitect solution to get over PostgresSQL maintenance period issue and ensure higher availability. 
 Thanks
Kishore

--
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/3fc986f2-38a4-45e5-8d7d-b05d0c28f1d9n%40googlegroups.com.

Tuesday, October 20, 2020

[google-cloud-sql-discuss] Cloud SQL Postgres Maintainence challenges

Current challenges: We are currently using Cloud SQL Postgres for Catalog, Promotions, Business configurations etc. Our back end application has dependency on Postgres stems from the fact that we have some tables which supports JSONB to support our discount structures. But Postgres has a serious drawback of having maintenance slots which are managed by Google and we never know when the maintenance will be performed. Even with read replicas this problem could not be averted. So we created another master, which is a clone of primary instance and weekly we do a manual backup restore to the clone. The master, master-replicas and the clone are load balanced with a ha-proxy.  

I am looking for a help and advise to address on the below use cases:
  1. Realtime data sync from one system  to another system.  Business users will be able to use these systems from multiple timezones. 
  2. Move existing catalog data, business config data, mapping tables and other general configuration tables to single data source
  3. Rearchitect solution to get over PostgresSQL maintenance period issue and ensure higher availability. 
 Thanks
Kishore

--
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/33943007-0a45-48a3-b150-cf2e53105de6n%40googlegroups.com.

Thursday, October 15, 2020

[google-cloud-sql-discuss] Re: Point in time recovery mysql

If your point-in-time recovery date stamp is set to a moment during the day before, then all data will get lost since that date stamp yesterday, and the moment something happens to your instance, as detailed in the Identifying the recovery position paragraph [1]. 

[1] https://cloud.google.com/sql/docs/mysql/backup-recovery/pitr#coordinates
On Wednesday, 14 October 2020 at 23:44:09 UTC-4 Fernando Gonzalez wrote:
Thanks for al the info

Then, if the binary logs are stored for each Automated Backup of my instance, and the backups are generated daily, if something happens to the instance just before the next backup is executed, what happens to the data? Is all the data between the daily backups lost or am I understanding something wrong?



On Wednesday, 14 October 2020 at 13:50:00 UTC-7 Olu wrote:
As you have rightly mentioned, the Point in time recovery depends on the Binary logs. The binary log file name and position that correspond to the target point in time you plan the recovery; these are the essential information to be used to carry out the Point in time Recovery. 

Binary Logging can be enabled on your CloudSQL Instance by following the steps here[1], and once it is enabled, the Binary Logs are stored for each Automated Backup of your CloudSQL Instance. The Binary logging use storage space on your CloudSQL Instance. However, the Binary logs are deleted with their associated automatic backup every 7 days[2].

You may be concerned about performance on your CloudSQL Instance with the binary logging enabled, well, as per this doc[3], performance of read operations are unaffected by binary logging, regardless of the size of the binary log files.

About estimating how much Data may be lost, I think that depends mainly on your choice of recovery position[4]. 

I hope this answers your questions. 

On Tuesday, October 13, 2020 at 3:41:04 PM UTC-4 Fernando Gonzalez wrote:
Hi, 

Sorry if it is very basic, but I don't understand something. For an instance of mysql with HA and Point in time recovery enabled. How can I estimate how much data can be lost (RPO)?

I understand that the backups are stored in multiple regions and that with backup + binary logs I can recover the database. But where are the binary logs stored? 

Thanks

--
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/1f3388e3-7501-4bf7-96b2-a9a872dafef7n%40googlegroups.com.

Wednesday, October 14, 2020

[google-cloud-sql-discuss] Re: Point in time recovery mysql

Thanks for al the info

Then, if the binary logs are stored for each Automated Backup of my instance, and the backups are generated daily, if something happens to the instance just before the next backup is executed, what happens to the data? Is all the data between the daily backups lost or am I understanding something wrong?



On Wednesday, 14 October 2020 at 13:50:00 UTC-7 Olu wrote:
As you have rightly mentioned, the Point in time recovery depends on the Binary logs. The binary log file name and position that correspond to the target point in time you plan the recovery; these are the essential information to be used to carry out the Point in time Recovery. 

Binary Logging can be enabled on your CloudSQL Instance by following the steps here[1], and once it is enabled, the Binary Logs are stored for each Automated Backup of your CloudSQL Instance. The Binary logging use storage space on your CloudSQL Instance. However, the Binary logs are deleted with their associated automatic backup every 7 days[2].

You may be concerned about performance on your CloudSQL Instance with the binary logging enabled, well, as per this doc[3], performance of read operations are unaffected by binary logging, regardless of the size of the binary log files.

About estimating how much Data may be lost, I think that depends mainly on your choice of recovery position[4]. 

I hope this answers your questions. 

On Tuesday, October 13, 2020 at 3:41:04 PM UTC-4 Fernando Gonzalez wrote:
Hi, 

Sorry if it is very basic, but I don't understand something. For an instance of mysql with HA and Point in time recovery enabled. How can I estimate how much data can be lost (RPO)?

I understand that the backups are stored in multiple regions and that with backup + binary logs I can recover the database. But where are the binary logs stored? 

Thanks

--
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/eda52c3f-0a12-481b-9df7-f9332eb9a98fn%40googlegroups.com.

[google-cloud-sql-discuss] Re: Point in time recovery mysql

As you have rightly mentioned, the Point in time recovery depends on the Binary logs. The binary log file name and position that correspond to the target point in time you plan the recovery; these are the essential information to be used to carry out the Point in time Recovery. 

Binary Logging can be enabled on your CloudSQL Instance by following the steps here[1], and once it is enabled, the Binary Logs are stored for each Automated Backup of your CloudSQL Instance. The Binary logging use storage space on your CloudSQL Instance. However, the Binary logs are deleted with their associated automatic backup every 7 days[2].

You may be concerned about performance on your CloudSQL Instance with the binary logging enabled, well, as per this doc[3], performance of read operations are unaffected by binary logging, regardless of the size of the binary log files.

About estimating how much Data may be lost, I think that depends mainly on your choice of recovery position[4]. 

I hope this answers your questions. 

[1]https://cloud.google.com/sql/docs/mysql/backup-recovery/pitr#enablingpitr
[2]https://cloud.google.com/sql/docs/mysql/backup-recovery/pitr#disk-usage
[3]https://cloud.google.com/sql/faq#pitr_perf
[4]https://cloud.google.com/sql/docs/mysql/backup-recovery/pitr#coordinates
On Tuesday, October 13, 2020 at 3:41:04 PM UTC-4 Fernando Gonzalez wrote:
Hi, 

Sorry if it is very basic, but I don't understand something. For an instance of mysql with HA and Point in time recovery enabled. How can I estimate how much data can be lost (RPO)?

I understand that the backups are stored in multiple regions and that with backup + binary logs I can recover the database. But where are the binary logs stored? 

Thanks

--
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/548a2ca4-d4dc-47a3-9b38-b3c672af28e0n%40googlegroups.com.

Tuesday, October 13, 2020

[google-cloud-sql-discuss] Point in time recovery mysql

Hi, 

Sorry if it is very basic, but I don't understand something. For an instance of mysql with HA and Point in time recovery enabled. How can I estimate how much data can be lost (RPO)?

I understand that the backups are stored in multiple regions and that with backup + binary logs I can recover the database. But where are the binary logs stored? 

Thanks

--
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/a3ecd4f0-8bb1-4d3e-909d-647c6e6919edn%40googlegroups.com.

Tuesday, October 6, 2020

Re: [google-cloud-sql-discuss] Re: google-cloud-sql: Name or service not known

Hello,

In order to receive the most efficient means of assistance, we would recommend inquiring about this technical issue on the corresponding Stack Overflow community topic through submitting a new question.

The Question and Answer format is much more suitable for technical issues and would allow for more suitable answers and explanations for the behavior seen here, and as it is more suitable, more community members will likely lend a helping hand.

--
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/f1e5ab39-e747-49cf-9079-352c75054cb6n%40googlegroups.com.

Re: [google-cloud-sql-discuss] Re: google-cloud-sql: Name or service not known

Hye
First of all I exported mysql db from localhost created an instance on cloud mysql and then using shell imported the tables.
This is how I am creating connection

mysql_connect('/cloudsql/'.$connection_name, $username, $password, $db);

After creating a connection I run the command gcloud app deploy and deploy the connection file and index file but when I run the query I couldn,t get the data this is my query.

$query_string  = "SELECT * FROM users;";
$result = mysql_query($conn,$query_string);

but I get $result as false

On Sun, Oct 4, 2020 at 11:40 PM 'Katayoon (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hi,

Could you provide more clarification on the steps you have taken to connect to the Cloud SQL instance? 

Are you trying to connect to the instance from your App Engine app? If so, you may double check the steps you have taken with this public documentation and if the issue still persists we need the REDACTED app.yaml to dig into the issue. 


On Saturday, October 3, 2020 at 7:45:04 PM UTC-4 alijut...@gmail.com wrote:
Hye 
I want to connect mysql db with my php project I have created the db and uploaded the project but unable to get data or run any query Here is what I get the error when I var_dump my connection variable

object(mysqli)#1 (19) {
  ["affected_rows"]=&gt;
  bool(false)
  ["client_info"]=&gt;
  bool(false)
  ["client_version"]=&gt;
  int(50012)
  ["connect_errno"]=&gt;
  int(2002)
  ["connect_error"]=&gt;
  string(71) "php_network_getaddresses: getaddrinfo failed: Name or service not known"
  ["errno"]=&gt;
  bool(false)
  ["error"]=&gt;
  bool(false)
  ["error_list"]=&gt;
  bool(false)
  ["field_count"]=&gt;
  bool(false)
  ["host_info"]=&gt;
  bool(false)
  ["info"]=&gt;
  bool(false)
  ["insert_id"]=&gt;
  bool(false)
  ["server_info"]=&gt;
  bool(false)
  ["server_version"]=&gt;
  bool(false)
  ["stat"]=&gt;
  bool(false)
  ["sqlstate"]=&gt;
  bool(false)
  ["protocol_version"]=&gt;
  bool(false)
  ["thread_id"]=&gt;
  bool(false)
  ["warning_count"]=&gt;
  bool(false)
}

--
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/76994535-760c-48e8-9183-b5f3e94b300en%40googlegroups.com.

--
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/CAA5zD%2BNWPTEZsQQEjwTeiXV8DEPc2MxFQz83bW-2Kfqm8cALWg%40mail.gmail.com.

[google-cloud-sql-discuss] Re: Mysql 5.7 instance unknown error

This was caused by an internal Google bug that's been solved during the night.

Il giorno lunedì 5 ottobre 2020 alle 16:31:03 UTC+2 Gabriele Volpato ha scritto:
Hello everyone,
We have a 5.7 Mysql instance that's been up and running for about a month without any problem. Since Saturday night, during an automated maintenance operation, we can't access it anymore.
All we can see is an "Unknown Error" on Cloud SQL console.

Investigating through the instance logs, exposes the following alert row:
2020-10-03T23:31:21.311568Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

We already tried recovering 3 different backups, even older ones, on the same instance and on new instances, without luck.

Our customer is now stuck, any help would be appreciated.
Thanks in advance,
Gabriele Volpato

--
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/ca1b10c5-4529-4ae4-8174-2a27efac49b4n%40googlegroups.com.

Monday, October 5, 2020

Re: [google-cloud-sql-discuss] Re: Installing MySQL on Linux VM

If using debian distributions, they use `default-mysql-server`, something like that, but that will install MariaDB, you probably need to add the oracle package to your repo.

On Mon, Oct 5, 2020 at 12:47 PM Atul Matkar <matkaratul@gmail.com> wrote:
$ sudo apt-get -y install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate

On Thursday, September 24, 2020 at 4:22:55 PM UTC-7 amit...@google.com wrote:
Hello, did you follow the steps mention here? Also Cloud Marketplace offers several options for MySQL installations, including a standalone MySQL installation, LAMP stacks, LEMP stacks, Nginx Stacks, a Percona MySQL Cluster installation, and several other options.

On Thursday, September 24, 2020 at 9:56:44 AM UTC-4 matka...@gmail.com wrote:
Hello I am trying to install MySQL on Linux vm that i created but it gives lot of dependencies error, could someone please help

net-tools is needed by mysql-community-server-8.0.21-1.el7.x86_64
        perl(Getopt::Long) is needed by mysql-community-server-8.0.21-1.el7.x86_64
        perl(strict) is needed by mysql-community-server-8.0.21-1.el7.x86_64
        procps is needed by mysql-community-server-8.0.21-1.el7.x86_64
        rtld(GNU_HASH) is needed by mysql-community-server-8.0.21-1.el7.x86_64
        shadow-utils is needed by mysql-community-server-8.0.21-1.el7.x86_64
        systemd is needed by mysql-community-server-8.0.21-1.el7.x86_64

When i try to install dependencies it says dependency already install and nothing to do...

--
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/a8f60b54-65ba-47fd-93d7-747867234e86n%40googlegroups.com.


--

Gabriela D'Avila Ferrara

gabidavila@google.com

Developer Advocate

twitter: @gabidavila

--
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/CAFJpfZhozDGP6sjPYmxoFb6JB-sKCepXns968z%3Dma2ZcUL1a_g%40mail.gmail.com.

[google-cloud-sql-discuss] Re: Installing MySQL on Linux VM

$ sudo apt-get -y install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package mysql-server is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'mysql-server' has no installation candidate

On Thursday, September 24, 2020 at 4:22:55 PM UTC-7 amit...@google.com wrote:
Hello, did you follow the steps mention here? Also Cloud Marketplace offers several options for MySQL installations, including a standalone MySQL installation, LAMP stacks, LEMP stacks, Nginx Stacks, a Percona MySQL Cluster installation, and several other options.

On Thursday, September 24, 2020 at 9:56:44 AM UTC-4 matka...@gmail.com wrote:
Hello I am trying to install MySQL on Linux vm that i created but it gives lot of dependencies error, could someone please help

net-tools is needed by mysql-community-server-8.0.21-1.el7.x86_64
        perl(Getopt::Long) is needed by mysql-community-server-8.0.21-1.el7.x86_64
        perl(strict) is needed by mysql-community-server-8.0.21-1.el7.x86_64
        procps is needed by mysql-community-server-8.0.21-1.el7.x86_64
        rtld(GNU_HASH) is needed by mysql-community-server-8.0.21-1.el7.x86_64
        shadow-utils is needed by mysql-community-server-8.0.21-1.el7.x86_64
        systemd is needed by mysql-community-server-8.0.21-1.el7.x86_64

When i try to install dependencies it says dependency already install and nothing to do...

--
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/a8f60b54-65ba-47fd-93d7-747867234e86n%40googlegroups.com.

[google-cloud-sql-discuss] Mysql 5.7 instance unknown error

Hello everyone,
We have a 5.7 Mysql instance that's been up and running for about a month without any problem. Since Saturday night, during an automated maintenance operation, we can't access it anymore.
All we can see is an "Unknown Error" on Cloud SQL console.

Investigating through the instance logs, exposes the following alert row:
2020-10-03T23:31:21.311568Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"

We already tried recovering 3 different backups, even older ones, on the same instance and on new instances, without luck.

Our customer is now stuck, any help would be appreciated.
Thanks in advance,
Gabriele Volpato

--
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/ef3201b2-fd3e-486c-b8fb-df7f93f2bf90n%40googlegroups.com.

Sunday, October 4, 2020

[google-cloud-sql-discuss] Re: google-cloud-sql: Name or service not known

Hi,

Could you provide more clarification on the steps you have taken to connect to the Cloud SQL instance? 

Are you trying to connect to the instance from your App Engine app? If so, you may double check the steps you have taken with this public documentation and if the issue still persists we need the REDACTED app.yaml to dig into the issue. 


On Saturday, October 3, 2020 at 7:45:04 PM UTC-4 alijut...@gmail.com wrote:
Hye 
I want to connect mysql db with my php project I have created the db and uploaded the project but unable to get data or run any query Here is what I get the error when I var_dump my connection variable

object(mysqli)#1 (19) {
  ["affected_rows"]=&gt;
  bool(false)
  ["client_info"]=&gt;
  bool(false)
  ["client_version"]=&gt;
  int(50012)
  ["connect_errno"]=&gt;
  int(2002)
  ["connect_error"]=&gt;
  string(71) "php_network_getaddresses: getaddrinfo failed: Name or service not known"
  ["errno"]=&gt;
  bool(false)
  ["error"]=&gt;
  bool(false)
  ["error_list"]=&gt;
  bool(false)
  ["field_count"]=&gt;
  bool(false)
  ["host_info"]=&gt;
  bool(false)
  ["info"]=&gt;
  bool(false)
  ["insert_id"]=&gt;
  bool(false)
  ["server_info"]=&gt;
  bool(false)
  ["server_version"]=&gt;
  bool(false)
  ["stat"]=&gt;
  bool(false)
  ["sqlstate"]=&gt;
  bool(false)
  ["protocol_version"]=&gt;
  bool(false)
  ["thread_id"]=&gt;
  bool(false)
  ["warning_count"]=&gt;
  bool(false)
}

--
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/76994535-760c-48e8-9183-b5f3e94b300en%40googlegroups.com.

Saturday, October 3, 2020

[google-cloud-sql-discuss] google-cloud-sql: Name or service not known

Hye 
I want to connect mysql db with my php project I have created the db and uploaded the project but unable to get data or run any query Here is what I get the error when I var_dump my connection variable

object(mysqli)#1 (19) {
  ["affected_rows"]=&gt;
  bool(false)
  ["client_info"]=&gt;
  bool(false)
  ["client_version"]=&gt;
  int(50012)
  ["connect_errno"]=&gt;
  int(2002)
  ["connect_error"]=&gt;
  string(71) "php_network_getaddresses: getaddrinfo failed: Name or service not known"
  ["errno"]=&gt;
  bool(false)
  ["error"]=&gt;
  bool(false)
  ["error_list"]=&gt;
  bool(false)
  ["field_count"]=&gt;
  bool(false)
  ["host_info"]=&gt;
  bool(false)
  ["info"]=&gt;
  bool(false)
  ["insert_id"]=&gt;
  bool(false)
  ["server_info"]=&gt;
  bool(false)
  ["server_version"]=&gt;
  bool(false)
  ["stat"]=&gt;
  bool(false)
  ["sqlstate"]=&gt;
  bool(false)
  ["protocol_version"]=&gt;
  bool(false)
  ["thread_id"]=&gt;
  bool(false)
  ["warning_count"]=&gt;
  bool(false)
}

--
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/28c2feed-bc21-44a3-8b73-4e7540a7d1c1n%40googlegroups.com.