问题
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