2

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

2

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."

0

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
0

Look at this information in the MySQL reference: http://dev.mysql.com/doc/refman/5.1/en/option-files.html

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy