完整的my.cnf配置参数文件

MySQL 版本: MySQL 8.0.23

cat > my.cnf << EOF

[client]
socket = /mysql/mysql3306/data/mysql.sock
# pipe
# socket=0.0
port=3306
[mysql]
default-character-set=UTF8MB4
[mysqld]
user=mysql
skip_ssl
default-time-zone='+8:00'
log_timestamps='SYSTEM'
transaction_isolation=read-committed
default_authentication_plugin=mysql_native_password
binlog_expire_logs_seconds=604800
slow_query_log=1
long_query_time=1
open_files_limit=65535
innodb_flush_log_at_trx_commit=1
interactive_timeout = 28800
wait_timeout = 28800
innodb_io_capacity=2000
read_buffer_size=16M
basedir=/usr/local/mysql
datadir=/usr/local/mysql/data
log-error=/usr/local/mysql/logs/mysql.log
slow-query-log-file=/usr/local/mysql/logs/mysql_slow_query.log
log-bin=/usr/local/mysql/logs/mysql_bin
port=3306
pid-file=/usr/local/mysql/data/mysqld.pid
lower_case_table_names=1
#skip-grant-tables
skip-name-resolve
socket = /usr/local/mysql/data/mysql.sock
character-set-server=UTF8MB4
default-storage-engine=INNODB
explicit_defaults_for_timestamp = true
# Server Id.
server-id=30001
max_connections = 10000
local_infile=1

table_open_cache=2000
tmp_table_size=246M
thread_cache_size=300
#限定用于每个数据库线程的栈大小。默认设置足以满足大多数应用
thread_stack = 192k
key_buffer_size=512M
read_rnd_buffer_size=32M
innodb_data_home_dir = /usr/local/mysql/data
innodb_log_buffer_size=16M
innodb_buffer_pool_size=4G
innodb_log_file_size=512M
innodb_thread_concurrency=128
innodb_autoextend_increment=1000
innodb_buffer_pool_instances=8
innodb_concurrency_tickets=5000
innodb_old_blocks_time=1000
innodb_stats_on_metadata=0
innodb_file_per_table=1
innodb_checksum_algorithm=0
innodb_open_files=65535
back_log=80
flush_time=0
join_buffer_size=128M
max_allowed_packet=1024M
max_connect_errors=99999
sort_buffer_size=32M
table_definition_cache=1400
binlog_row_event_max_size=8K
sync_master_info=10000
sync_relay_log=10000
sync_relay_log_info=10000
#批量插入数据缓存大小,可以有效提高插入效率,默认为8M
bulk_insert_buffer_size = 64M
log-bin-trust-function-creators=1
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
net_write_timeout=600
net_read_timeout=300
#collation_server=utf8mb4_unicode_ci
collation_server=utf8mb4_general_ci
group_concat_max_len=10240
sync_binlog=1

replicate-wild-ignore-table    = mysql.%
replicate-wild-ignore-table    = performance_schema.%
gtid_mode = on
enforce_gtid_consistency = 1

#
# include all files from the config directory
#
!includedir /etc/my.cnf.d

EOF

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值