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

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • 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. CentOS / RHEL 6 : How to Start/Stop MySQL Server (mysqld)
  2. What’s a good process to find and eliminate slow queries in MySQL
  3. MySQL: How to Set Account Resource Limits
  4. Configuring mysqld to log slow queries
  5. “Access denied for user ‘username’@’hostname’ (using password: YES)” – Error while connecting MySQL with PHP
  6. Backup and Restore Of Group Replication Node ( MySQL 8.0 )
  7. How To Create a Local Yum Repository for MySQL Enterprise Packages
  8. How to Migrate from Oracle to MySQL
  9. How to Configure Multiple MySQL Servers On One System Using mysqld_multi
  10. Beginners Guide to Storage Engines in MySQL

You May Also Like

Primary Sidebar

Recent Posts

  • What are different Oracle Database Vault Roles
  • Unable to export realm protected table using data pump
  • Beginners Guide to Oracle Database Vault
  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary