google cloud sql - How do I persist MySQL configuration variables in CloudSQL? -


i can't seem find instructions or examples on how set , persist mysql configuration variables in google's cloudsql.

the specific problem i'm encountering interactive sessions hang around 8 hours default and, if disconnected interactive session thread remains open , update transactions block until kill thread.

the solution found one:

set global interactive_timeout=300; 

to terminate interactive session after 5 minutes.

but solution not work because error:

error 1227 (42000): access denied; need (at least 1 of) super privilege(s) operation

and adding super privileges fails this:

mysql> grant super on *.* 'root'@'%' identified '<pwd>'; error 1045 (28000): access denied user 'root'@'%' (using password: yes) 

so seems root user of cloud sql instance not have sufficient privileges set global variables.

separately, can't figure out how persist setting remain in place if server restarted.

i've looked @ using:

gcloud sql instances patch 

but not seem have ability patch these settings.

any appreciated.

you can set limited number of flags on instance, see this google doc.

unfortunately not include interactive_timeout flag.


original answer

it not possible set global variables on cloud sql either cloud console or gcloud utility.

and cloud sql not support granting super privileges see bottom of page .

however in similar question google cloud sql max-allowed-packet googler has answered saying can email them @ cloud-sql@google.com project , instance name , can configure settings you, may able set interactive_timeout you.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

c# - Unity IoC Lifetime per HttpRequest for UserStore -

I am trying to solve the error message 'incompatible ranks 0 and 1 in assignment' in a fortran 95 program. -