Correct way to setup local config on Ubuntu?

I’ve installed percona on ubuntu oneiric. Installation is fine.

The setup gives me /etc/mysql/debian.cnf, and it is this file which is referenced by the init.d scripts.

However, I want to use my own config, which was generated from percona’s online wizard tool.

One way I’d thought of was to modify debian.cnf to read in any config files in conf.d, but it says “AUTOMATICALLY GENERATED - DO NO EDIT”.

Or, I could create my own my.cnf in /etc/mysql, but then the init.d scripts don’t work. For example, ‘service mysql status’ tells me there is no mysqld running, when there is.

What’s the correct way to set this up?

TIA
Rachel

Hi Rachel,

Generally, you can create your own my.cnf in /etc/mysql and you can update /etc/init.d/mysql with new my.cnf.

nil-Dell:/etc/mysql$ sudo cat /etc/init.d/mysql | grep CONF
CONF=/etc/mysql/my.cnf <<<< ----- you can open /etc/init.d/mysql in any editor and you can give path to new my.cnf.
nil-Dell:/etc/mysql$

For example, ‘service mysql status’ tells me there is no mysqld running, when there is.
Can you tell me how you have checked this? Can you give me output of below commands?

shell> sudo service mysql status
shell> ps -aux|grep mysql