This post covers all versions of MySQL Server and is intended for anyone who is configuring MySQL including dbas, developers, students, etc. The post explains the different configuration files that are used by the MySQL Server.
my.cnf
The default configuration file is called my.cnf (or my.ini for Microsoft Windows) and can be located in a number of directories. On Linux and other Unix related platforms, the locations are using /etc/my.cnf, /usr/my.cnf or in the default installation directory. This file contains configuration settings that will be loaded when the server is first started including settings for the clients, server, mysqld_safe wrapper and various other mysql client programs.
my-new.cnf
This file is created when there is an existing my.cnf file and the mysql_install_db script is run. The mysql_install_db script is designed to create the my.cnf file if it does not exist. If the file does exist, then the file is created using the name my-new.cnf to avoid overwriting an existing configuration file. It is then up to the user to compare the two configuration files and determine which options are still valid for the new install and change the files as required to get the new my.cnf configuration file.
.my.cnf
This file is used to define user-specific options.
auto.cnf
The auto.cnf is a new file that was introduced in the 5.6 version of MySQL Server. It is part of the new replication system that uses global transaction id’s (GTID’s) and contains information that uniquely identifies the server using an UUID. This file is automatically generated when the software is installed and should not be changed.