How to set innodb_buffer_pool_size in mysql in google cloud sql?

只愿长相守 提交于 2019-12-24 10:59:29

问题


I can not set innodb_buffer_pool_size from the edit in the https://console.cloud.google.com . It just do not have this parameter.

I also can not set innodb_buffer_pool_size with the sql:

mysql> SET GLOBAL innodb_buffer_pool_size=2147483648;
ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

回答1:


It is not currently possible - we always set innodb_buffer_pool_size to something like 75% of machine RAM.

In your case it seems you need more memory for some per-connection buffers and less in innodb_buffer_pool_size. We have ideas on how to automatically detect such conditions and reduce innodb_buffer_pool_size but nothing in practice yet.

The practical workaround for you right now is to increase instance size: with more memory you will have more slack for per-transaction buffers. The other probably less practical workaround is to decrease load on the database by either having less concurrent queries running (try using connection pool with limited number of connections) or by simplifying them (less JOINs, etc).



来源:https://stackoverflow.com/questions/46399994/how-to-set-innodb-buffer-pool-size-in-mysql-in-google-cloud-sql

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