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 ?
Mysql – Why “sudo vim /etc/the.cnf” file is empty
my.cnfMySQL
Related Question
- Mysql – some InnoDB settings in My.cnf are messing up everything, why
- Mysql – Why “.the.cnf” file is empty
- MySQL – Need Help Tuning my.cnf File for Performance
- Mysql – How to make binlog-format=ROW the start up default in the /etc/the.cnf file
- Mysql – Optimization of variables in the.cnf (thesql) for Drupal
- Mysql – What options in /etc/thesql/the.cnf are applicable to percona-server-client-5.6
- Mysql – Where should I store a custom “.the.cnf” file
- MySQL – InnoDB High I/O Parameters Causing Crashes
Best Answer
.my.cnf
in your home directory is only read by the mysql clients, so this is not where you should set system variables for the mysql server..my.cnf
can be used e.g. for your credentials so that you can log in without having to type the username and password every time.The system variables for the server as well as system wide for all users can be configured in
/etc/my.cnf
and files included by that file. If you want to edit this or change any system variables, make sure to set the variables in the correct section of the file. See the documentation on option files for more details and examples.SHOW VARIABLES;
will show all system variables and their values - this includes variables you haven't explicitly set in your.cnf
files as it will also show variables that just have default values.