Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've just set some innodb settings in my.cnf and restarted the server but they haven't taken effect.

What's the correct way to do this?

I did:

sudo vi /etc/mysql/my.cnf

saved the file, and then ran sudo /etc/init.d/mysql restart

share|improve this question

3 Answers 3

up vote 0 down vote accepted

without knowing more details of what you changed, and assuming your mysql reads the /etc/mysql/my.cnf file fine (I don't know Ubuntu), the only thing I can think of is where you placed the innodb settings. Are the settings in the [mysqld] group?

According to the manual : "You can place InnoDB options in the [mysqld] group of any option file that your server reads when it starts."

share|improve this answer

Yes, this is what should be done normally!

Did you check the result of the second command sudo /etc/init.d/mysql restart? It can fail sometimes. You can confirm this by listing the pid value of mysql process before and after restarting it.

$ ps -ef | grep mysql
share|improve this answer

Look at this information in the MySQL reference:

It explains where MySQL looks for your cnf file. Use this info to confirm that MySQL is using the cnf file you think it is.

share|improve this answer

Your Answer


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