|
发表于 2013-9-3 10:26:20
|
显示全部楼层
本帖最后由 terranboy 于 2013-9-3 10:27 编辑 7 _' o7 X/ b1 l$ v# K, L! e' ]7 ]
2 l* r3 A0 n8 j& [几个参数改一下
/ {8 Z' ^- n$ W6 G# vim /etc/my.cnf" ~" w) l2 y+ m2 a
' q* q$ o5 t1 \1 p+ @; S
key_buffer_size = 256M3 m) L) B8 w3 L
max_allowed_packet = 4M' H( C% N- @8 d& a8 V4 C: v
table_open_cache = 1024
, q7 [/ j$ {5 e3 ]" x( }& Tsort_buffer_size = 6M
2 _5 D0 i9 j; U: D+ @net_buffer_length = 8K
8 q+ `: d$ C4 B. o6 r; g0 {: ?! Nread_buffer_size = 4M
6 L5 Q' n, b5 g' E4 g9 Njoin_buffer_size = 8M/ r4 U5 Z5 w# l% N9 _5 a
read_rnd_buffer_size = 32M+ V5 Z7 C9 g( Q2 ?" p' X2 D
tmp_table_size = 256M
C0 K" f. E% G# d* g1 xmyisam_sort_buffer_size =64M
) @3 {5 Z7 N! ~& G/ I& o: k$ Mquery_cache_size= 128M
2 s! z& W; T3 d/ z" F# C
$ X5 z/ b7 x, t0 s3 j Y重启MYSQL
V! n8 u8 L/ D* i0 B; J' j7 h+ {- u6 L) Z; c
现在都从MYSQL转到MARIADB了 性能比MYSQL好 完全兼容的
* c/ I; g) n* J8 ]/ {1 Y: G. J' y% G+ Q5 J5 z
' A9 T5 N, N, [- D l& y |
|