MySQL my.cnf configuration example for CentOS Linux 6

Get the default configuration file my.cnf for MySQL, optimized for CentOS Linux 6. This example configuration ensures optimal compatibility and performance for MySQL, making it easy to set up and adjust to meet your needs.

Find and download the configuration file here: /etc/my.cnf.

For more configurations and setup guides, visit our related files section to further customize your system.

    [mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

    
  

Config Details

Location
/etc/my.cnf
Operating system
CentOS Linux 6
Length
10 lines
MD5 checksum
8ace886bbe7e274448bc8bea16d3ead6

Usage

Download the raw file with wget or curl

Wget

wget -O my.cnf.example https://exampleconfig.com/static/raw/mysql/centos6/etc/my.cnf

cURL

curl https://exampleconfig.com/static/raw/mysql/centos6/etc/my.cnf > my.cnf.example