centos8安装mysql8配置my.cnf
centos8安装mysql8配置my.cnf
my.cnf
[mysqld]
basedir=/opt/mysql
datadir=/opt/mysql/data
socket=/opt/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
#开启日志
log-bin=mysql-bin
server-id=1
binlog-format=ROW
#主从复制数据库
#binlog-do-db=chuangzhi
binlog_ignore_db=mysql
[mysqld_safe]
log-error=/opt/mysql/mariadb/mariadb.log
pid-file=/opt/mysql/mariadb/mariadb.pid
#
# include all files from the config directory
#
[client]
port=3306
socket=/opt/mysql/mysql.sock
!includedir /etc/my.cnf.d