[mysqld]
port = 3306
basedir = /data/mysql
datadir = /data/mysql/data
socket = /data/mysql/data/mysql.sock
server-id=01
max_connections = 20000
max_user_connections = 20000
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
user = root
log-error = /data/mysql/log/mysql.log.err
general_log = ON
general_log_file=/data/mysql/log/mysql_general.log
slow_query_log = ON
slow_query_log_file = /data/mysql/log/mysql_slow_query.log
long_query_time = 3
default_authentication_plugin=mysql_native_password
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
[client]
socket = /data/mysql/data/mysql.sock
[Unit]
Description=MySQL Server
After=syslog.target
After=network.target
[Service]
Type=simple
TimeoutSec=300
ExecStart=/data/mysql/bin/mysqld --defaults-file=/data/mysql/etc/my.cnf
[Install]
WantedBy=default.target