MySQL5.7.28 配置文件編寫

默認狀況下,MySQL服務或者客戶端都會讀取/etc/my.cnf做爲配置文件,除非指定default-filemysql

[mysqld]sql

port=3306socket

innodb_file_format=barracudaide

innodb_large_prefix=onorm

lower_case_table_names=1it

sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTIONio

datadir=/var/lib/mysqlinnodb

socket=/var/lib/mysql/mysql.sockevent

# Disabling symbolic-links is recommended to prevent assorted security risksmariadb

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

ma

#

# include all files from the config directory

#

!includedir /etc/my.cnf.d


[client]

port=3306

socket=/var/lib/mysql/mysql.sock

相關文章
相關標籤/搜索