[root@localhost ~]# cat /etc/my.cnf
[mysqld]
#datadir=/var/lib/mysql
#socket=/var/lib/mysql/mysql.sock
datadir=/opt/local/mysql
socket=/opt/local/mysql/mysql.sock
log-error=/opt/local/mysql/logs/mysqld.log
character-set-server=utf8
collation-server=utf8_general_ci
#log-error=/var/log/mysqld.log
# 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
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
#
# include all files from the config directory
!includedir /etc/my.cnf.d