mysql配置

linux 里mysql的配置

[client]
port=3306
socket=/data/mysql/mysql.sock

[mysqld]
port=3306
datadir=/data/mysql/data
basedir=/applications/mysql
pid-file=/data/mysql/mysqld.pid
socket=/data/mysql/mysql.sock
user=mysql
character-set-server=utf8mb4
default-storage-engine=INNODB
collation-server = utf8mb4_general_ci
init_connect=‘SET NAMES utf8mb4’
max_connections = 1000
max_connect_errors = 1200
max_allowed_packet = 128M
explicit_defaults_for_timestamp = true
query_cache_size = 0
query_cache_type = 0
log_error = /data/mysql/log/error.log
slow_query_log = 1
slow_query_log_file = /data/mysql/log/slow.log
log_queries_not_using_indexes = 1
log_throttle_queries_not_using_indexes = 5
long_query_time = 8
log_slow_slave_statements = 1
min_examined_row_limit = 100
expire_logs_days = 5
tmpdir = /tmp
innodb_buffer_pool_size = 128M

[mysqld_safe]
log-error=/data/mysql/log/mysqld.log
pid-file=/data/mysql/mysqld.pid

你可能感兴趣的:(mysql)