企业环境下MySQL5.5调优

fangcloud 622 2022-07-18

本文转载自网络公开信息

参照 腾讯云 和ucloud my.cnf 以及网上找的资料 整理出来的 my.cnf , 以后修改任何参数都会继续更新 也是在测试阶段

物理机 : ubuntu14.04 配置 8core 32G mysql : 5.5.62

调优配置

[client] port            = 3306 socket          = /var/run/mysqld/mysqld.sock default-character-set = utf8 [mysqld_safe] socket          = /var/run/mysqld/mysqld.sock [mysqld] user            = mysql pid-file        = /var/run/mysqld/mysqld.pid socket          = /var/run/mysqld/mysqld.sock port            = 3306 basedir         = /usr datadir         = /var/lib/mysql tmpdir          = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking key_buffer             = 256M max_allowed_packet     = 1073741824 thread_stack           = 512K thread_cache_size      = 50 max_connections        = 5000 max_connect_errors     = 1000000 table_cache            = 4096 max_heap_table_size    = 128M open_files_limit       = 102400 back_log               = 2000 thread_concurrency     = 20 sort_buffer_size       = 524288 ft_min_word_len        = 4 query_cache_size       = 0 log_error                          = /var/log/mysql/error.log log_slow_queries                   = /var/log/mysql/mysql-slow.log long_query_time                    = 3 server-id                          = 1 log_bin                            = /var/log/mysql/mysql-bin.log expire_logs_days                   = 2 tmp_table_size                     = 4294967295 #default_table_type                = InnoDB #loose-skip-bdb default-storage-engine             =InnoDB innodb_file_format=barracuda #ROW_FORMAT=COMPRESSED innodb_additional_mem_pool_size    = 64M innodb_buffer_pool_size            = 6G innodb_data_file_path              = ibdata1:128M:autoextend innodb_read_io_threads             = 8 innodb_write_io_threads            = 8 innodb_thread_concurrency          = 20 innodb_flush_log_at_trx_commit     = 2 innodb_log_buffer_size             = 8388608 innodb_log_file_size               = 512M innodb_log_files_in_group          = 3 innodb_max_dirty_pages_pct         = 90 innodb_lock_wait_timeout           = 120 [mysqldump] quick quote-names max_allowed_packet                 = 1073741824 [mysql] default-character-set              = utf8 [isamchk] key_buffer                         = 256M !includedir /etc/mysql/conf.d/

附一些参数的简单解释

本站部分文章、图片属于网络上可搜索到的公开信息,均用于学习和交流用途,不能代表亿方云的观点、立场或意见。我们接受网民的监督,如发现任何违法内容或侵犯了您的权益,请第一时间联系小编邮箱daifeng@360.cn 处理。
上一篇:为什么保存之后找不到ppt了呢(ppt保存以后找不到怎么办)
下一篇:怎样关闭wps版本更新(怎么关闭wps的自动更新)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~