512M内存 linux VPS中的mysql配置

发表时间:2013-06-20 13:30 | 分类:Mysql | 浏览:3,009 次

以下是512M内存 linux VPS中的mysql配置,各个参数的意义朋友们可以百度下。

配置文件:/etc/my.cnf,配置仅供参考。

[client]
port = 3306
socket = /tmp/mysql.sock

[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 24M
sort_buffer_size = 512K
read_buffer_size = 2M

read_rnd_buffer_size = 4M

join_buffer_size = 256K
thread_cache_size = 10
query_cache_size = 1M
query_cache_limit = 2M
query_cache_min_res_unit = 4K

thread_concurrency = 2

table_cache = 720
table_open_cache = 720

open_files_limit = 1000
back_log = 80
max_connections = 100
max_connect_errors = 200
external-locking = FALSE

max_allowed_packet = 16M
default-storage-engine = MyISAM
thread_stack = 192K
transaction_isolation = READ-COMMITTED

tmp_table_size = 4M

max_heap_table_size = 32M

bulk_insert_buffer_size = 4M

myisam_sort_buffer_size = 8M

myisam_max_sort_file_size = 10G
myisam_repair_threads = 1
myisam_recover

server-id = 1

[mysqldump]
quick
max_allowed_packet = 32M

[mysql]
no-auto-rehash

[myisamchk]
key_buffer_size = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

本文标签:

本文链接:https://www.sijitao.net/1361.html

欢迎您在本博客中留下评论,如需转载原创文章请注明出处,谢谢!

一键脚本 博客历程 留言联系 文章归档 网站地图 谷歌地图
Copyright © 2010-2024 章郎虫博客 All Rights Reserved.