Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

If you want to change some of the global configuration setting of MySQL There are two ways.

1. By Changing variable using SET GLOBAL option on running MySQL instance,this does not require server restart we can change variables like Ex : I need to set my key buffer to 128 MB

SET GLOBAL key_buffer_size = 128*1024*1024;

But using this technique we can not change or configure all variables and once we restart MySQL these GLOBAL settings are lost.

2. By Changing variables in config file (my.cnf)

This requires a server restart but changes are permanent.

share|improve this answer
Upvoted. The only mention is: You can combine point 1 and 2. First change the params values by "SET GLOBAL VAR = VAL", then make the same change in the my.cnf. Once the server will be restarted, it will take the values from my.cnf. – MTIhai May 14 '13 at 14:07
Note that some options can't be changed via method #1 (for example, you can change key_buffer_size but not innodb_buffer_pool_size). The MySQL Server Option and Variable Reference lists these in its summary table with a "No" in the "Dynamic" column. – Nathan Jolly May 14 '13 at 15:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.