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
Download the raw file with wget or curl
wget -O my.cnf.example https://exampleconfig.com/static/raw/mysql/centos6/etc/my.cnf
curl https://exampleconfig.com/static/raw/mysql/centos6/etc/my.cnf > my.cnf.example
Other config files you might find useful