[client]
port = 3306
socket = usr/local/lnmp/mysql-5.7.21/mysql.sock
[mysqld]
basedir = /usr/local/lnmp/mysql-5.7.21
datadir = /usr/local/lnmp/mysql-5.7.21/data
port = 3306
server_id = 1
socket = /usr/local/lnmp/mysql-5.7.21/mysql.sock
#二进制日志目录
log-bin = /usr/local/lnmp/mysql-5.7.21/mysql-bin
#自动删除过期日志的天数
expire_logs_days = 10
#限制单个文件大小
max_binlog_size = 100M
#查询日志
general_log = 1
#查询日志文件位置
general_log_file = /usr/local/lnmp/mysql-5.7.21/query.log
#慢查询日志
slow_query_log = 1
#慢日志文件位置
slow_query_log_file = /usr/local/lnmp/mysql-5.7.21/slow-query.log
#超过2秒记录
long-query_time = 2
#错误日志
log-error = /usr/local/lnmp/mysql-5.7.21/error.log
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES