hz 32G内存 G口 Intel Core i7-4770 MariaDB5.5.60优化配置
2019/07/26 再次更新配置
- [mysqld]
- datadir = /var/lib/mysql
- socket = /var/lib/mysql/mysql.sock
- # Disabling symbolic-links is recommended to prevent assorted security risks
- log-queries-not-using-indexes
- log-slow-admin-statements
- log-slow-slave-statements
- symbolic-links = 0
- character-set-server = utf8mb4
- interactive_timeout = 31536000
- wait_timeout = 31536000
- max_allowed_packet = 64M
- max_connections = 100000
- max_connect_errors = 1000000
- thread_cache_size = 512
- max_user_connections = 99999
- slow_query_log = ON
- long_query_time = 1
- table_cache = 614
- table_open_cache = 10240
- thread_concurrency = 32
- query_cache_type = 1
- query_cache_size = 32M
- query_cache_limit = 2M
- key_buffer_size = 5120M
- sort_buffer_size = 10M
- join_buffer_size = 1M
- read_buffer_size = 8M
- read_rnd_buffer_size = 32M
- thread_stack = 512K
- bulk_insert_buffer_size = 8M
- min_examined_row_limit = 5
- query_cache_min_res_unit = 2k
- innodb_log_buffer_size = 8.388608e+06
- innodb_thread_concurrency = 1
- innodb_buffer_pool_size = 8342177280
- slow_query_log_file = /var/log/mariadb/slow.log
- log_bin = OFF
- server_id = 1
- open_files_limit = 10000
- [mysqld_safe]
- log-error = /var/log/mariadb/mariadb.log
- pid-file = /var/run/mariadb/mariadb.pid
- # include all files from the config directory
- !includedir /etc/my.cnf.d
- # 慢查询相关参数
- [client]
- socket = /var/lib/mysql/mysql.sock
复制代码
上海网友:感谢楼主的分享
内蒙古网友:踩坑无数,含辛茹苦啊~.~
河北网友:这个参数是给什么配置的主机用的? 占用内存大概多少?
海南网友:hz 32G内存 G口 Intel Core i7-4770 MariaDB5.5.60优化配置
江苏网友:啊哈哈哈,大佬打扰了~
这面没有用过这么高配置的机器呢。
天津网友:这配置我最少上MariaDB10.4
江西网友:楼主,为什么不用mysql?
河南网友:30G的数据量升级好麻烦
河南网友:python+mariadb 都是sh脚本一键安装啊 也一样的。
上海网友:2019/07/26 再次更新配置