Mysql 配置文件,适合用于内存为 512MB 的主机

配置文件:/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.cnblogs.com/911dong/p/5149199.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值