Take the 2-minute tour ×
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. It's 100% free, no registration required.

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
    
Perhaps mysql is using configurations not mentioned in home/.my.cnf; but something else. –  aliasm2k Jan 3 at 14:19
    
Why can't you just add those variables to my.cnf? I did that... –  kkuilla Jan 3 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 at 14:22
    
If I add them should I restart mysql ? –  Basel Jan 3 at 14:23
    
yes, you should restart mysql service –  Slowcoder Jan 3 at 15:37
show 2 more comments

migrated from stackoverflow.com Jan 3 at 16:02

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

1 Answer

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
add comment

Your Answer

 
discard

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