• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Understanding the Different Configuration files used for MySQL Server

by admin

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.

Note: As of 5.6 version, the my.cnf is written, but all the lines are commented out. The user is required to manually edit the options they want that would vary from the default settings.

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.

WARNING: Do NOT modify or delete the auto.cnf file!
How to find location of MySQL configuration file(s)

Filed Under: mysql

Some more articles you might also be interested in …

  1. How to configure resource groups for MySQL Server running on Linux
  2. Beginners Guide to MySQL Data Types
  3. How to find Which Process Is Killing mysqld With SIGKILL or SIGTERM on Linux
  4. Beginners Guide to Implementing Table Maintenance in MySQL
  5. MySQL: How To Find Queries Taking Longer Than N Seconds
  6. Excluding a table or database from MySQL replication
  7. What is the meaning of the TRX_TABLES_LOCKED column in the information_schema.INNODB_TRX MySQL table
  8. How To Configure Separate Override.conf For Multiple MySQL Instances Using Systemd
  9. How to Restore a Cluster Slave Using its Own Backups
  10. How to take Logical Backups on a MySQL Replication Slave using shell script

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright