MariaDB my.cnf configuration example for CentOS Linux 7

Get the default configuration file my.cnf for MariaDB, optimized for CentOS Linux 7. This example configuration ensures optimal compatibility and performance for MariaDB, 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
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd

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

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d


    
  

Config Details

Location
/etc/my.cnf
Operating system
CentOS Linux 7
Length
19 lines
MD5 checksum
723727cb0572654bc5143e28115e3ed3

Usage

Download the raw file with wget or curl

Wget

wget -O my.cnf.example https://exampleconfig.com/static/raw/mariadb/centos7/etc/my.cnf

cURL

curl https://exampleconfig.com/static/raw/mariadb/centos7/etc/my.cnf > my.cnf.example