Where is my my.cnf?

Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"

Top Level » MySQL / MariaDB

Where is my my.cnf?Last Modified: Oct 9, 2010, 4:04 pm
Your my.cnf for the system will be at:


DirectAdmin does create a secondary my.cnf, but it's only used for the mysqldump calls. It's found at


and should not be changed as it's overwritten regularly (based on the mysql.conf in the same directory).

Apart from those 2 my.cnf files, you should not have any my.cnf files anywhere else.

Common "bad" my.cnf files are:


You shouldn't have this file.. and you shouldn't even have a /etc/mysql directory, as it will conflict with your /etc/my.cnf.



This should not exist as our call to mysqldump will find it. Often admin's will have a user/password in that file, which breaks our calls to mysqldump.

In your 2 my.cnf files, only /usr/local/directadmin/conf/my.cnf should have a user/password value.  No other my.cnf file should have a user/pass set in it.
Related Helpfiles
How to Optimize MySQL

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST