0

I want to edit some of InnoDB variables ,I go to the .my.cnf which is located in home/.my.cnf I found the file just empty.

And when I check SHOW VARIABLES in MySQL it gives me all the variables and their values.

Why the file is empty and how can I edit the needed variables ? and can that affect my database or damage it in anyway?

NEEDED Variable:

innodb_buffer_pool_size = 16G
innodb_additional_mem_pool_size = 2G
innodb_log_file_size = 1G
innodb_log_buffer_size = 8M
  • Perhaps mysql is using configurations not mentioned in home/.my.cnf; but something else. – aliasm2k Jan 3 '14 at 14:19
  • Why can't you just add those variables to my.cnf? I did that... – kkuilla Jan 3 '14 at 14:21
  • ok so If I add those variables to the file there is no problem? and I can add them as they are or i should add a [mysqld] before them? – Basel Jan 3 '14 at 14:22
  • If I add them should I restart mysql ? – Basel Jan 3 '14 at 14:23
  • yes, you should restart mysql service – Slowcoder Jan 3 '14 at 15:37
1

The ~/.my.cnf file is usually used for client options (for example changing the default port or host).

mysqld will likely start as a different user and will not read your .my.cnf file. It is recommended to set these options in /etc/my.cnf instead.

|improve this answer|||||

Your Answer

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