|
发表于 2013-9-3 10:26:20
|
显示全部楼层
本帖最后由 terranboy 于 2013-9-3 10:27 编辑 1 [2 D( f0 {' J# K: [! u
+ F& k& s; Q# K" Z
几个参数改一下, m. Z" f6 P. \4 Q5 ^$ K& k% p6 s
# vim /etc/my.cnf% b+ c5 b4 B: ^5 L8 K0 x; ?
|5 w4 j- |) _: Bkey_buffer_size = 256M3 D9 V w) \* f8 ]: O
max_allowed_packet = 4M
8 T% Z2 O- z0 j* q& N) Dtable_open_cache = 1024$ w3 X8 x# E/ v2 H8 Y: _
sort_buffer_size = 6M
# Y3 m% X; P8 w) n( V8 `) Snet_buffer_length = 8K; W* O2 i0 c1 N0 F6 X
read_buffer_size = 4M+ l- _1 |* l( Q
join_buffer_size = 8M
( L! s8 j0 I* ]6 J6 yread_rnd_buffer_size = 32M( w$ E& R9 l8 z& @
tmp_table_size = 256M
1 P b p1 F: X% ]myisam_sort_buffer_size =64M
; Z( Z- p. s: @7 F# nquery_cache_size= 128M8 f7 f* W4 k s" I) b# H' A& g6 c
* [( Z9 ?! W+ P
重启MYSQL' `# w# e7 l5 n( R7 r% j
, v% P$ }8 i, C8 }4 O现在都从MYSQL转到MARIADB了 性能比MYSQL好 完全兼容的1 j) T6 ^- Z. L$ ~& o; Y! q
" }+ [9 m# O' w) ~2 p1 V: X% D
1 c' r+ X: U, o
|
|