• 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. MySQL Shell: Using External Python Modules
  2. How to find Which Process Is Killing mysqld With SIGKILL or SIGTERM on Linux
  3. Which Ports are Used by mysqld, ndb_mgmd, and ndbd/ndbmtd in a MySQL Cluster Installation
  4. How to backup and restore MySQL database
  5. MySQL: How To Find Queries Taking Longer Than N Seconds
  6. How to Configure 2-way replication in an existing Master, Slave MySQL Replication environment
  7. How to Change the Default Character Set and Collation for a Database in MySQL
  8. How to Restore a Cluster Slave Using its Own Backups
  9. What is the purpose of “system user” in MySQL Replication
  10. How To Rotate the MySQL Enterprise Audit Log Plugin Log Based On Size

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright