3、【创业必备企业架构】SpringCloud大型企业分布式微服务云架构源码之MySQL 管理
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/
附一些参数的简单解释
发表评论
暂时没有评论,来抢沙发吧~