« 上一篇 | 下一篇»

my.cnf

28 十月, 2012 20:29 •  (0) 迴響  •  引用(0)  •  1524 hit.  • 分類: 資訊組工作 , 學校網路 , Mysql   

Server 上 MySQL 服務的設定檔是 /etc/my.cnf,這一陣子覺得很多主機都慢慢的,才想到 Server 安裝好,都沒去調教一下 MySQL 的設定。

把以前的舊資料拿出來,修改了/etc/my.cnf 的設定,感覺網站變順了!(Maybe......)

再筆記一下吧!

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

# Semisynchronous Replication
http://dev.mysql.com/doc/refman/5.5/en/replication-semisync.html
# uncomment next line on MASTER
;plugin-load=rpl_semi_sync_master=semisync_master.so
# uncomment next line on SLAVE
;plugin-load=rpl_semi_sync_slave=semisync_slave.so

# Others options for Semisynchronous Replication
;rpl_semi_sync_master_enabled=1
;rpl_semi_sync_master_timeout=10
;rpl_semi_sync_slave_enabled=1

http://dev.mysql.com/doc/refman/5.5/en/performance-schema.html
;performance_schema


[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
key_buffer = 384M
max_allowed_packet = 1M
table_cache = 512
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size = 32M
max_connections = 1024
thread_concurrency = 8

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 256M
sort_buffer_size = 256M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

創用 CC 授權條款
 
 
Related Posts Plugin for WordPress, Blogger...

0 Comments on "my.cnf"

 

發表迴響
 authimage

Google+ 迴響

*********