Mysql – Reloading MySQL the.cnf changes

my.cnfMySQL

Do you have to restart MySQL to edit changes? Or can you edit them on the fly and restart MySQL or make the changes inside MySQL?

This server runs 100s of website that are active and I don't really want to bring mysql down for a restart unless I have to.

Best Answer

Stop the server, make the changes in my.cnf and then start the server. It will reflect the changes properly.
If the variable is global then you can change it inside MySQL,
but it will retain the new value until next server restart only.
And if it's a session variable it will retain the new value for that particular session only.
For example:
mysql> set global max_connections=200;