MySQL ignoring my.cnf

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


Solution 1:

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