google-cloud-sql - max_allowed_packet

。_饼干妹妹 提交于 2019-12-23 09:02:27

问题


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!


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/20955950/google-cloud-sql-max-allowed-packet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!