mysql/scripts/my.cnf
2025-02-18 16:10:27 +03:00

91 lines
2.6 KiB
INI

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html
[mysqldump]
set-gtid-purged=OFF
[MYSQLD]
user=mysql
server-id=2000
bind-address=0.0.0.0
datadir=/var/lib/mysql
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
socket=/var/lib/mysql/mysql.sock
pid_file=/var/run/mysqld/mysqld.pid
port=3306
#log_error=/var/log/mysqld.log
#log-error-verbosity=1
# log_output = FILE
lower_case_table_names=1
#Slow logging
slow_query_log_file=/var/log/mysql-slow.log
long_query_time=2
slow_query_log=OFF
log_queries_not_using_indexes=OFF
### INNODB OPTIONS
innodb_buffer_pool_size=43G
# innodb_flush_log_at_trx_commit = 2
innodb_file_per_table=1
## You may want to tune the below depending on number of cores and disk sub
innodb_read_io_threads=4
innodb_write_io_threads=4
innodb_doublewrite=1
innodb_log_file_size=1024M
innodb_log_buffer_size=96M
innodb_buffer_pool_instances=8
innodb_log_files_in_group=2
innodb_thread_concurrency=0
# innodb_file_format = barracuda
# innodb_flush_method = O_DIRECT
innodb_rollback_on_timeout=ON
# innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode=2
## avoid statistics update when doing e.g show tables
innodb_stats_on_metadata=0
innodb_io_capacity = 20000
default_storage_engine=innodb
thread_stack = 1920K
# OTHER THINGS, BUFFERS ETC
key_buffer_size = 200M
tmp_table_size = 64M
max_heap_table_size = 64M
max_allowed_packet = 512M
skip_name_resolve
memlock=0
sysdate_is_now=1
max_connections=10000
max_user_connections=20000
thread_cache_size=40
table_open_cache=1024
performance_schema = ON
performance-schema-max-mutex-classes = 0
performance-schema-max-mutex-instances = 0
log_bin=binlog
relay_log=relay-bin
expire_logs_days=7
read_only=OFF
log_bin_trust_function_creators = 1;
#validate_password.policy = LOW
#validate_password.special_char_count = 0
#validate_password.check_user_name = OFF
default-authentication-plugin = caching_sha2_password
#validate_password.mixed_case_count = 0
#validate_password.length =6
#validate_password.number_count = 0
binlog_transaction_dependency_tracking = WRITESET
enforce_gtid_consistency = ON
gtid_mode = ON