Saturday, May 30, 2020

[google-cloud-sql-discuss] My mysql server disk size is 775GB. But the actual database is only 24GB.

My mysql server disk size is 775GB. But the actual database is only 24GB. Google is charging me lot of money. how to fix it? 

--
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/a392ccdd-9442-42da-b5e2-d8732a089a1a%40googlegroups.com.

[google-cloud-sql-discuss] Error show in Google Cloud SQL - Operation Failed - value requested is not valid

When i add a new public IP in connection for access MySQL, it show error operation failed - value requested is not valid, 

please help to resolve this issue.

--
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/a77656ed-6c88-494b-80ac-a37340fea8be%40googlegroups.com.

Friday, May 29, 2020

[google-cloud-sql-discuss] Re: Export Cloud SQL data into a CSV, including headers and adding a custom delimiter

I will do so, thank you both very much!

On Saturday, May 30, 2020 at 5:18:27 AM UTC+3, Mary (Cloud Platform Support) wrote:
Hello Luca,

Currently with the API you would need to specify the column names when exporting, when as you mentioned you are not aware of the name(s) or number of columns it can be difficult. 

There is an existing public feature request to have the table headers included in the export which can be viewed here[1]. There is no ETA nor a guarantee this feature request will be implemented in the future. 

I suggest you to up vote the feature request (click on the plus 1 button), this will help the engineering team to know that there are more users interested in this feature request. You can also star the feature request in order to receive any updates should there be any posts. 





On Tuesday, May 26, 2020 at 12:53:43 PM UTC-4, Luca Vlad wrote:
Hello, I am using the REST API for exporting the data from a SQL Cloud db into a csv on a bucket. Documentation for the API is : Cloud SQL to CSV. A further explanation of the request body parameters is found here: REST API request. Because my data contains ',' I want to change the default deliminator into '|' . Also I want my csv file to include a header line (table columns names). Do you guys know anything that can help?
Thank you very much!

--
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/2b1f7db9-9b84-4c59-841d-d67a9e003906%40googlegroups.com.

[google-cloud-sql-discuss] Re: Connect to Cloud SQL Private Postgres instance from outside

Thanks for reaching out!

It seems as though there may be a connection issue, which requires more in depth analysis of your project.

Can you please elaborate on any documentation that you may be following? To be able to connect to an instance configured on a Private IP outside of GCP, you need to be able to access the VPC, which you are doing with the Proxy. Can you please try connecting as described in the documentation for Private IPs?

Ideally, Google Groups are best suited for product discussions as well as service status updates and release notes. These types of questions are best suited for Stack Overflow, or if reproducible, on our Public Issue Tracker. More details can be found on our Community Support page.

Regards,

Manpreet
Google Cloud Platform Support, Montreal

--
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/e29fe972-b864-485a-84d4-71128b226a90%40googlegroups.com.

[google-cloud-sql-discuss] Re: Export Cloud SQL data into a CSV, including headers and adding a custom delimiter

Hello Luca,

Currently with the API you would need to specify the column names when exporting, when as you mentioned you are not aware of the name(s) or number of columns it can be difficult. 

There is an existing public feature request to have the table headers included in the export which can be viewed here[1]. There is no ETA nor a guarantee this feature request will be implemented in the future. 

I suggest you to up vote the feature request (click on the plus 1 button), this will help the engineering team to know that there are more users interested in this feature request. You can also star the feature request in order to receive any updates should there be any posts. 


[1] https://issuetracker.google.com/111342008



On Tuesday, May 26, 2020 at 12:53:43 PM UTC-4, Luca Vlad wrote:
Hello, I am using the REST API for exporting the data from a SQL Cloud db into a csv on a bucket. Documentation for the API is : Cloud SQL to CSV. A further explanation of the request body parameters is found here: REST API request. Because my data contains ',' I want to change the default deliminator into '|' . Also I want my csv file to include a header line (table columns names). Do you guys know anything that can help?
Thank you very much!

--
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/9ae408da-7722-4b61-8ef9-89b5bf62e47b%40googlegroups.com.

[google-cloud-sql-discuss] Re: Connect to Cloud SQL Private Postgres instance from outside

I have been fighting with the same issue on my setup (connecting locally to my remote private IP cloud sql). Had you found a solution to this @Louis ?

On Friday, May 29, 2020 at 9:37:55 AM UTC-4, Louis-P. Lamoureux wrote:
Hi !

I am trying to connect to Cloud SQL Private Postgres instance from outside GCP.

The Postgres instance does not have a public IP and is using a VPC network. To reach it I am using the cloud sql docker proxy on OSX and a service account with the cloud sql admin role and cloud sql API enabled.

I am able to start the proxy and request a connection to the instance:


$
Listening on 0.0.0.0:5432 for myproject:northamerica-northeast1:myproject-database-someid
$
Ready for new connections
$
New connection for "myproject:northamerica-northeast1:myproject-database-someid"
 

The request eventually times out as it is refused:


$ couldn
't connect to "myproject:northamerica-northeast1:myproject-database-someid": dial tcp 192.168.0.3:3307: connect: connection refused



However in the Postgres database logs I can see that the request was reached and authorized:

{ ...,
authorizationInfo
:
[ 0:
{
granted: true
permission
: "cloudsql.instances.connect"
resource
: "instances/myproject-database-someid"
resourceAttributes
: {}
} ]
methodName
: "cloudsql.instances.connect"




I have tried applying firewall rules (open port 3307) on the VPC network to no avail.


--
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/ed327fdc-5023-4e40-aec7-7258f36d46d8%40googlegroups.com.

[google-cloud-sql-discuss] Re: Does CloudSQL MySQL block client access?

Mohammad,

Thank you for the input. My coworker is working GCP support at the moment. I will post an update if I got any progress.

Hirotake

On Thursday, May 28, 2020 at 10:10:47 PM UTC-7, Mohammad I (Cloud Platform Support) wrote:

Hello Hirotake,


The error that you have indicated in your message occurs if successful connection

is not established even after the max_connect_errors successive connection requests from a host. At that point the host gets blocked to make further connections by the Server.  


I do see that you have indicated the on-premise MySQL instance and another instance built from source code (5.7.25) works as intended but not MySQL based Cloud SQL Instance. 


In this regard, I have noticed max_connect_errors flag is not supported at the moment as it is not in the supported flags list of MySQL based Cloud SQL instance. 


In addition to that I have not seen the error that you have indicated among known connection issues of MySQL based Cloud SQL. 


However after connecting to MySQL database of Cloud SQL and running the command "show variables like "max_connect_errors";", I can see the max_connect_errors value is 100 as described in the MySQL documentation. 


Based on that to me it appears that MySQL based Cloud SQL instance is not working as intended. I would suggest you to report the issue by creating a Public Issue selecting the Cloud SQL component under the Storage and Databases section of this document


In case you need to share any Project specific information please select the Private component to make sure the information is not visible to Public. After that one of the Google Cloud Support team members will assist you further.


Please also note that this forum is meant for general discussion of the platform, not specific technical issues. You can find more info about Community Support Overview on Google Groups here.


On Wednesday, May 27, 2020 at 2:58:42 PM UTC-4, Hirotake Shimoji wrote:
This is a cross post from cloudsql channel in GCP Slack, but I have not received any response yet. So, please allow me to post it here too.

Hello. I tested if Cloud SQL MySQL (version 5.7) blocks access from its clients when the number of connection related errors exceeds the value of `max_connect_errors` variable.

I used "echo | nc -v X.X.X.X 3306" from my workstation and a VM in GCP against a publicly accessible Cloud SQL MySQL instance (X.X.X.X is the server IP address).  I did this to simulate an incomplete handshake, but the instance didn't block access from the sources; even though the number of failed handshakes exceeded the max_connect_errors value.

I did the same testing against an existing on-premise MySQL instance and another instance built from source code (5.7.25).  I confirmed it blocked access on the client side from sources that reached max_connect_errors.  It gave the message, "Host 'Y.Y.Y.Y' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'".

I noticed there was no entry in performance_schema.host_cache table even after upgrading the machine type to db-n1-highmem-4, which is a requirement to enable performance_schema.
So, I am wondering if Google dropped the host blocking logic from Cloud SQL MySQL. I searched GCP docs, but couldn't find any. Does anybody have information about host blocking in Cloud SQL MySQL?

--
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/9fd56eb1-3111-4f11-a657-e6bc54430976%40googlegroups.com.

[google-cloud-sql-discuss] Re: Cloud SQL Importation

Cloud SQL does not support SUPER privileges, as stated on the "Cloud SQL FAQ" page. On the same page, you may find the "Do I need a Cloud Storage account to import or export data to an instance?" sub-chapter of particular interest. 

--
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/b5c35cba-664f-442e-923f-c7314810229b%40googlegroups.com.

[google-cloud-sql-discuss] Connect to Cloud SQL Private Postgres instance from outside

Hi !

I am trying to connect to Cloud SQL Private Postgres instance from outside GCP.

The Postgres instance does not have a public IP and is using a VPC network. To reach it I am using the cloud sql docker proxy on OSX and a service account with the cloud sql admin role and cloud sql API enabled.

I am able to start the proxy and request a connection to the instance:


$
Listening on 0.0.0.0:5432 for myproject:northamerica-northeast1:myproject-database-someid
$
Ready for new connections
$
New connection for "myproject:northamerica-northeast1:myproject-database-someid"
 

The request eventually times out as it is refused:


$ couldn
't connect to "myproject:northamerica-northeast1:myproject-database-someid": dial tcp 192.168.0.3:3307: connect: connection refused



However in the Postgres database logs I can see that the request was reached and authorized:

{ ...,
authorizationInfo
:
[ 0:
{
granted: true
permission
: "cloudsql.instances.connect"
resource
: "instances/myproject-database-someid"
resourceAttributes
: {}
} ]
methodName
: "cloudsql.instances.connect"




I have tried applying firewall rules (open port 3307) on the VPC network to no avail.


--
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/80f5504e-3908-4841-b728-f4f02307af2b%40googlegroups.com.

[google-cloud-sql-discuss] Cloud SQL Importation

How do I give SUPER permission when importing my SQL file from storages to my SQL instance.

--
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/0a3e730c-e8b9-4ead-a9c3-f9ee32177499%40googlegroups.com.

Thursday, May 28, 2020

[google-cloud-sql-discuss] Re: Difference in minor versions test and production database

Hi Elliot,

thanks for you response.

I've created an issue with about the same information in this ticket.

https://issuetracker.google.com/issues/157681342

On Thursday, 28 May 2020 21:04:36 UTC+2, Elliott (Google Cloud Platform Support) wrote:
Hello Bart,

It seems unusual that your Cloud SQL instances are not at the same version because Cloud SQL is a managed product. Updating is one of the benefits. It seems that your instances should be at the same level. In this case, I would ask you to submit a bug to have this investigated. You may open a Google Issue Tracker here.



Met vriendelijke groet / With kind regards,
Bart Stavenuiter
Team Lead Development
SOCIAL BLUE
Nieuwe Steen 27
​1625 HV  Hoorn
​The Netherlands 
T: 
+31 (0)229 283 000
E: 
b.stavenuiter@socialblue.com
We're an official Facebook Marketing Partner
Kvk: 59384360

[google-cloud-sql-discuss] Re: Export Cloud SQL data into a CSV, including headers and adding a custom delimiter

Hello,
Thanks for your answer! In regards with the query, I can not just do the query:
SELECT <query> INTO OUTFILE ... CHARACTER SET 'utf8mb4'
        FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"'
        ESCAPED BY '\\' LINES TERMINATED BY '\n'
Because I am accessing the resources via the REST API and if I exchange the  string parameter from:
  "csvExportOptions": {
    "selectQuery": string
  }
with the specified query the  FIELDS TERMINATED BY ','  is actually begin discarded.
In regards with the include headers I saw that solution, but that solution always means that you are aware of the column names and always change them when they change in the database. I was searching for a more automated method one that can get the column names without specifically mentioning them. Basically I wanted to tun something like: "SELECT * FROM table_name" and get data and column names.

Thank you! 

--
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/247f14db-27ac-425b-b8fb-5853408e2d5f%40googlegroups.com.

[google-cloud-sql-discuss] Re: Does CloudSQL MySQL block client access?

Hello Hirotake,


The error that you have indicated in your message occurs if successful connection

is not established even after the max_connect_errors successive connection requests from a host. At that point the host gets blocked to make further connections by the Server.  


I do see that you have indicated the on-premise MySQL instance and another instance built from source code (5.7.25) works as intended but not MySQL based Cloud SQL Instance. 


In this regard, I have noticed max_connect_errors flag is not supported at the moment as it is not in the supported flags list of MySQL based Cloud SQL instance. 


In addition to that I have not seen the error that you have indicated among known connection issues of MySQL based Cloud SQL. 


However after connecting to MySQL database of Cloud SQL and running the command "show variables like "max_connect_errors";", I can see the max_connect_errors value is 100 as described in the MySQL documentation. 


Based on that to me it appears that MySQL based Cloud SQL instance is not working as intended. I would suggest you to report the issue by creating a Public Issue selecting the Cloud SQL component under the Storage and Databases section of this document


In case you need to share any Project specific information please select the Private component to make sure the information is not visible to Public. After that one of the Google Cloud Support team members will assist you further.


Please also note that this forum is meant for general discussion of the platform, not specific technical issues. You can find more info about Community Support Overview on Google Groups here.


On Wednesday, May 27, 2020 at 2:58:42 PM UTC-4, Hirotake Shimoji wrote:
This is a cross post from cloudsql channel in GCP Slack, but I have not received any response yet. So, please allow me to post it here too.

Hello. I tested if Cloud SQL MySQL (version 5.7) blocks access from its clients when the number of connection related errors exceeds the value of `max_connect_errors` variable.

I used "echo | nc -v X.X.X.X 3306" from my workstation and a VM in GCP against a publicly accessible Cloud SQL MySQL instance (X.X.X.X is the server IP address).  I did this to simulate an incomplete handshake, but the instance didn't block access from the sources; even though the number of failed handshakes exceeded the max_connect_errors value.

I did the same testing against an existing on-premise MySQL instance and another instance built from source code (5.7.25).  I confirmed it blocked access on the client side from sources that reached max_connect_errors.  It gave the message, "Host 'Y.Y.Y.Y' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'".

I noticed there was no entry in performance_schema.host_cache table even after upgrading the machine type to db-n1-highmem-4, which is a requirement to enable performance_schema.
So, I am wondering if Google dropped the host blocking logic from Cloud SQL MySQL. I searched GCP docs, but couldn't find any. Does anybody have information about host blocking in Cloud SQL MySQL?

--
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/8fe7573e-fb7d-42a4-afbd-fcf794ab75d6%40googlegroups.com.

[google-cloud-sql-discuss] Re: Difference in minor versions test and production database

Hello Bart,

It seems unusual that your Cloud SQL instances are not at the same version because Cloud SQL is a managed product. Updating is one of the benefits. It seems that your instances should be at the same level. In this case, I would ask you to submit a bug to have this investigated. You may open a Google Issue Tracker here.



--
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/a8abe403-3595-446e-99d0-95553b049d8c%40googlegroups.com.

[google-cloud-sql-discuss] Re: Export Cloud SQL data into a CSV, including headers and adding a custom delimiter

Bună Luca, 

You have an example on the page you linked to, of the query used to select data for export: 

  SELECT <query> INTO OUTFILE ... CHARACTER SET 'utf8mb4'
        FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\"'
        ESCAPED BY '\\' LINES TERMINATED BY '\n'

To change the default delimiter you can use FIELDS TERMINATED BY, and, generally, adapt this query to your needs. The ExportContext object contains:

  "csvExportOptions": {
    "selectQuery": string
  }

You can use this string value of the selectQuery parameter to tailor the query sent as part of the InstancesExportRequest, when calling the Method: instances.export

There is no ready-made way to include table column names, one needs to provide for that separately, but you can find examples on the Web, for instance the reply to question "Include headers when using SELECT INTO OUTFILE?" in stackoverflow. 

You can use this string value of the selectQuery parameter to tailor the query sent as part of the InstancesExportRequest, when calling the Method: instances.export

--
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/7f052bfc-b2d2-485a-b173-cf1d7d6157b2%40googlegroups.com.

Re: [google-cloud-sql-discuss] Re: Cloud SQL Docker Proxy

Thank you. 

Specifying the absolute path of the key file solved my issue.

Louis

On Thursday, 28 May 2020 11:31:25 UTC-4, Kurtis Van Gent wrote:
I would suggest taking a look at the "Authorizing with the Cloud SQL proxy" page, which goes into detail on the different ways to pass credentials. 

If you are still having issues, I would suggest making sure to share the full command you are using to start the proxy, minus any instance names or other PII. 

On Wednesday, May 27, 2020 at 11:58:42 AM UTC-7 llam...@gmail.com wrote:
Thank you for your response George. 

I am indeed using the JSON key of a service account with attributed roles mentioned in the documentation (cloud sql admin). The Cloud SQL Admin API is also enabled.

Would you by any chance, have another lead ?

On Wed, May 27, 2020 at 2:06 PM 'George (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:
Hello Louis, 

You mention authentication by means of the application-default login. If you are trying to connect from your local environment, you need to create and use a service account, as documented on the page you linked to, sub-chapter Connecting a psql client using the proxy Docker image, paragraph 6. You must also have enabled the Cloud SQL Admin API.  

--
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-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/7f19c601-4346-4121-b04a-311e1ca443e5%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/28eb5fbc-29b6-4fbb-8889-b03e329ca263%40googlegroups.com.

Re: [google-cloud-sql-discuss] Re: Cloud SQL Docker Proxy

I would suggest taking a look at the "Authorizing with the Cloud SQL proxy" page, which goes into detail on the different ways to pass credentials. 

If you are still having issues, I would suggest making sure to share the full command you are using to start the proxy, minus any instance names or other PII. 

On Wednesday, May 27, 2020 at 11:58:42 AM UTC-7 llam...@gmail.com wrote:
Thank you for your response George. 

I am indeed using the JSON key of a service account with attributed roles mentioned in the documentation (cloud sql admin). The Cloud SQL Admin API is also enabled.

Would you by any chance, have another lead ?

On Wed, May 27, 2020 at 2:06 PM 'George (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud...@googlegroups.com> wrote:
Hello Louis, 

You mention authentication by means of the application-default login. If you are trying to connect from your local environment, you need to create and use a service account, as documented on the page you linked to, sub-chapter Connecting a psql client using the proxy Docker image, paragraph 6. You must also have enabled the Cloud SQL Admin API.  

--
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-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/7f19c601-4346-4121-b04a-311e1ca443e5%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/1d3705df-71e4-421b-b1f6-055273eae0cb%40googlegroups.com.

Re: [google-cloud-sql-discuss] Re: How do you move a cloudsql instsance to a smaller disk?

Yes, we are aware the storage capacity cannot be decreased, hence the question.

Thanks for those steps. This is a production DB that cannot be taken offline, is there another step to do a replication? Sorry if I left that point out.

- Jake

On Monday, May 25, 2020 at 11:44:45 PM UTC-4, yananc wrote:

Hi Jacob,


As Sabyasachi has pointed out in the doc, once the instance is created, the storage capacity cannot be decreased. The best option is to create a new instance with the desired capacity and then copy all the data of the old instance into it. The copying process could include exporting data to a CSV file and importing the file to the newly created instance.


Hope it helps!

--
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/3905c389-79d9-428a-bcfd-d7eb28500ca0%40googlegroups.com.

[google-cloud-sql-discuss] Difference in minor versions test and production database

Hi,

We've got two databases in Google Cloud SQL. One for production and one for testing purposes.

However the versions differer between the two.


Test-database-version: 5.7.25
Production-database-version: 5.7.14

We are using this Aggregate (GROUP BY) Function added in 5.7.22 
https://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html#function_json-arrayagg


Is there a way to tell Google Cloud Sql to upgrade the database to the latest or maybe minimal version? 
I read the upgrade policy, but it seems to say that these minor updates are automatically and you cannot specify when these update should occur.

thanks in advance!


Met vriendelijke groet / With kind regards,
Bart Stavenuiter
Team Lead Development
SOCIAL BLUE
Nieuwe Steen 27
​1625 HV  Hoorn
​The Netherlands 
T: 
+31 (0)229 283 000
E: 
b.stavenuiter@socialblue.com
We're an official Facebook Marketing Partner
Kvk: 59384360

Wednesday, May 27, 2020

Re: [google-cloud-sql-discuss] Re: Cloud SQL Docker Proxy

Thank you for your response George. 

I am indeed using the JSON key of a service account with attributed roles mentioned in the documentation (cloud sql admin). The Cloud SQL Admin API is also enabled.

Would you by any chance, have another lead ?

On Wed, May 27, 2020 at 2:06 PM 'George (Cloud Platform Support)' via Google Cloud SQL discuss <google-cloud-sql-discuss@googlegroups.com> wrote:
Hello Louis, 

You mention authentication by means of the application-default login. If you are trying to connect from your local environment, you need to create and use a service account, as documented on the page you linked to, sub-chapter Connecting a psql client using the proxy Docker image, paragraph 6. You must also have enabled the Cloud SQL Admin API.  

--
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/7f19c601-4346-4121-b04a-311e1ca443e5%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/CAP3XAYuWeYkPgw5RaiSO_zmxmgY98%2BNeToJ5xWy--_66dnkUVw%40mail.gmail.com.

[google-cloud-sql-discuss] Does CloudSQL MySQL block client access?

This is a cross post from cloudsql channel in GCP Slack, but I have not received any response yet. So, please allow me to post it here too.
https://googlecloud-community.slack.com/archives/C0H0GRV39/p1590525710126000

Hello. I tested if Cloud SQL MySQL (version 5.7) blocks access from its clients when the number of connection related errors exceeds the value of `max_connect_errors` variable.

I used "echo | nc -v X.X.X.X 3306" from my workstation and a VM in GCP against a publicly accessible Cloud SQL MySQL instance (X.X.X.X is the server IP address).  I did this to simulate an incomplete handshake, but the instance didn't block access from the sources; even though the number of failed handshakes exceeded the max_connect_errors value.

I did the same testing against an existing on-premise MySQL instance and another instance built from source code (5.7.25).  I confirmed it blocked access on the client side from sources that reached max_connect_errors.  It gave the message, "Host 'Y.Y.Y.Y' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'".

I noticed there was no entry in performance_schema.host_cache table even after upgrading the machine type to db-n1-highmem-4, which is a requirement to enable performance_schema.
So, I am wondering if Google dropped the host blocking logic from Cloud SQL MySQL. I searched GCP docs, but couldn't find any. Does anybody have information about host blocking in Cloud SQL MySQL?

--
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/ef515a51-fb6e-4371-a71e-6442f8c08613%40googlegroups.com.