Monday, August 19, 2019

ERROR 1238 (HY000): Variable is a read only variable in MySQL Database


Few times when we want to increase the performance of MySQL database, by tweaking certain MySQL variables as suggested by MySQL documentation. We sometimes notice we are not able to make the proper modification with some errors. It's good to have a prevailing knowledge about which parameters can be changed dynamically and for those not, can align with different team to get downtime.

You can refer to https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html, about the parameters that can be changed dynamically for version pertaining to MySQL database version 5.7.

Error:

mysql> set global innodb_open_files=600;
ERROR 1238 (HY000): Variable 'innodb_open_files' is a read only variable

Fix:

1. Edit the changes related to the parameter in my.cnf file, at the operating system level.
2. Bounce MySQL services. So that changes are persistent.

No comments:

Post a Comment