Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question

migrated from Jan 3 '14 at 16:02

This question came from our site for professional and enthusiast programmers.

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

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.

share|improve this answer

Your Answer


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