google-cloud-sql-max_allowed_packet [英] google-cloud-sql - max_allowed_packet
问题描述
我正在将数据库迁移到使用Google Cloud SQL,该数据库以前的max_allowed_packet为20M.
I was moving a database to using Google Cloud SQL which previously had a max_allowed_packet of 20M.
当前,max_allowed_packet的Google Cloud SQL默认值为1M.
Currently the Google Cloud SQL default for max_allowed_packet is 1M.
有什么办法可以将此变量增加到20M吗?我已经尝试了以下方法:
Is there any way to increase this variable to 20M? I have already tried the following:
set global max_allowed_packet = 20971520;
哪个返回:
错误代码:1621. SESSION变量'max_allowed_packet'是只读的.使用SET GLOBAL分配值
Error Code: 1621. SESSION variable 'max_allowed_packet' is read-only. Use SET GLOBAL to assign the value
然后:
set global max_allowed_packet = 20971520;
这将返回错误:
错误代码:1227.访问被拒绝;您需要(至少其中一种)SUPER权限才能进行此操作
Error Code: 1227. Access denied; you need (at least one of) the SUPER privilege(s) for this operation
预先感谢您的帮助!
推荐答案
您现在可以通过在开发人员控制台中编辑实例来自行设置.
You can now set it yourself by editing the instance in Developer Console.
所有可设置的标志都记录在这里: https://cloud.google.com/sql/docs/mysql-flags
All the settable flags are documented here: https://cloud.google.com/sql/docs/mysql-flags
这篇关于google-cloud-sql-max_allowed_packet的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!