my.cnf如何配置


这篇文章主要为大家展示了“my.cnf如何配置”,内容简而易懂,条理清晰,希望能够帮助大家解决疑惑,下面让小编带领大家一起研究并学习一下“my.cnf如何配置”这篇文章吧。[client]
default-character-set =utf8mb4
por开发云主机域名t =PORT
socket =/srv/myPORT/run/mysql.sock

[mysqld]
user =mysql
port =PORT
extra-port =1PORT
character_set_server =utf8mb4
server_id =SERVER_ID
socket =/srv/myPORT/run/mysql.sock
basedir =/opt/percona-server
datadir =/srv/myPORT/data
log-error =/srv/myPORT/log/alert.log
pid-file =/srv/myPORT/run/mysql.pid
log_slave_updates =1
log-bin =/srv/myPORT/log/mysql-bin
binlog_format =row
binlog_cache_size =2M
max_binlog_cache_size =4G
max_binlog_size =1G
expire_logs_days =7
relay-log =/srv/myPORT/log/relay-bin
relay-log-info-file =/srv/myPORT/log/relay-log.info
relay-log-index =/srv/myPORT/log/relay-log.index
master-info-file =/srv/myPORT/log/master.info
relay-log-recovery =true
sync-relay-log-info =1
explicit_defaults_for_timestamp
key_buffer_size =2M
sort_buffer_size =2M
read_buffer_size =2M
read_rnd_buffer_size =16M
join_buffer_size =2M
thread_cache_size =1024
query_cache_size =1M
query_cache_limit =1M
query_cache_min_res_unit =2k
table_open_cache =2048
open_files_limit =65535
back_log =3000
max_connections =4000
max_user_connections =2500
max_connect_errors =100
max_allowed_packet =512M
thread_stack =192k
default-storage-engine=INNODB
transaction_isolation =READ-COMMITTED
tmp_table_size =16M
max_heap_table_size =64M
bulk_insert_buffer_size =64M
long_query_time =0.5
slow_query_log =on
slow_query_log_file =/srv/myPORT/log/slow.log
skip-name-resolve
innodb_buffer_pool_size=10G
innodb_data_file_path =ibdata1:2G:autoextend
innodb_file_io_threads =24
innodb_purge_threads =12
innodb_read_io_threads =24
innodb_write_io_threads =24
innodb_thread_concurrency =24
innodb_buffer_pool_instances =8
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size =16M
innodb_log_file_size =2G
innodb_log_files_in_group=2
innodb_max_dirty_pages_pct=75
innodb_lock_wait_timeout =50
innodb_file_per_table=1
thread_handling =pool-of-threads
thread_pool_idle_timeout =180
thread_pool_max_threads =5000
thread_pool_size =24
thread_pool_oversubscribe=10
thread_pool_stall_limit =500
[mysqldump]
quick
max_allow_packet =64M
[mysql]
no-auto-rehash
[mysqlhotcopy]
interactive-timeout 以上是“my.cnf如何配置”这篇文章的所有内容,感谢各位的阅读!相信大家都有了一定的了解,希望分享的内容对大家有所帮助,如果还想学习更多知识,欢迎关注开发云行业资讯频道!

相关推荐: MySQL备份数据库的方法

这篇文章主要讲解了MySQL备份数据库的方法,内容清晰明了,对此有兴趣的小伙伴可以学习一下,相信大家阅读完之后会有帮助。一提到数据,大家神经都会很紧张,数据的类型有很多种,但是总归一点,数据很重要,非常重要,因此,日常的数据备份工作就成了运维工作的重点中的重点…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 06/26 10:16
下一篇 06/26 10:16

相关推荐