google-cloud-sql - max_allowed_packet
Asked Answered
L

3

7

I was moving a database to using Google Cloud SQL which previously had a max_allowed_packet of 20M.

Currently the Google Cloud SQL default for max_allowed_packet is 1M.

Is there any way to increase this variable to 20M? I have already tried the following:

set global max_allowed_packet = 20971520;

Which returns:

Error Code: 1621. SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value

and then:

set global max_allowed_packet = 20971520;

This returns the error:

Error Code: 1227. Access denied; you need (at least one of) the SUPER privilege(s) for this operation

Thank you in advance for your help!

Lollapalooza answered 6/1, 2014 at 17:43 Comment(0)
B
7

You can now set it yourself by editing the instance in Developer Console.

All the settable flags are documented here: https://cloud.google.com/sql/docs/mysql-flags

Bogeyman answered 7/1, 2014 at 5:5 Comment(1)
This is out of date - You can set max_allowed_package from the cloud console now at console.developers.google.com/projectBogeyman
H
10

To change your max_allowed_packet on Google Cloud SQL, go to the overview of your instance on the cloud console, click on edit and look for the MySQL Flags section at the bottom of the page. max_allowed_packet is one of the flags you can set there. Set the value you want, and save/confirm.

Herzog answered 24/7, 2014 at 20:21 Comment(0)
B
7

You can now set it yourself by editing the instance in Developer Console.

All the settable flags are documented here: https://cloud.google.com/sql/docs/mysql-flags

Bogeyman answered 7/1, 2014 at 5:5 Comment(1)
This is out of date - You can set max_allowed_package from the cloud console now at console.developers.google.com/projectBogeyman
I
0

In my case I couldn't update the max_allowed_packet setting because I had a flag of sql_mode=TRADITIONAL which expects the value to be a multiple of 1024.

Irresponsive answered 18/2, 2020 at 12:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.