Question

I just started learning about cluster so I don't have much knowledge if question is not appropriate please forgive me.

I have a 3 node InnoDB cluster running .suppose if I want to tune my server by changing the value of the innodb_buffer_pool_size variable or let say I want to add a new variable in configuration file do I need to change the my.cnf file of every server or is there any simple way I can achieve this.

and how do I change the server system variable so that the setting will be replicated to other servers too?

Was it helpful?

Solution

Yes, you have to change the variable on every node, and if you want the change to be permanent, then you also have to change the relevant options file (e.g. my.cnf).

innodb_buffer_pool_size is dynamic (since MySQL 5.7), so at least you don't have to restart the nodes for the change to take effect:

SET GLOBAL innodb_buffer_pool_size=402653184; 

(Don't forget to also set the value in the options file so it becomes permanent, i.e. so the change survives restarts.)

EDIT

If you're using MySQL 8.0+ then there's a handy feature that allows you to set a global variable and persist it to a special options file:

SET PERSIST max_connections = 1000;

See the SET syntax documentation for more details.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top