MySQL性能调整之my.cnf文件的配置方法

日期: 2008-06-18 来源:TechTarget中国

  MySQL性能调整之my.cnf文件的配置方法:



[mysqld]


datadir=/var/lib/mysql


socket=/var/lib/mysql/mysql.sock


skip-locking


set-variable = key_buffer=16M


set-variable = max_allowed_packet=1M


set-variable = thread_stack=64K


set-variable = record_buffer=1M


set-variable = table_cache=1024


set-variable = sort_buffer=4M


set-variable = net_buffer_length=8K


set-variable = max_connect_errors=100


set-variable = max_connections=1024


server-id = 1


[mysqldump]


quick


set-variable = max_allowed_packet=16M


[mysql]


no-auto-rehash


# Remove the next comment character if you are not familiar with SQL


#safe-updates


[isamchk]


set-variable = key_buffer=20M


set-variable = sort_buffer=20M


[myisamchk]


set-variable = key_buffer=20M


set-variable = sort_buffer=20M


[mysqlhotcopy]


interactive-timeout


[mysql.server]


user=mysql


basedir=/var/lib


[safe_mysqld]


err-log=/var/log/mysqld.log


pid-file=/var/run/mysqld/mysqld.pid

我们一直都在努力坚持原创.......请不要一声不吭,就悄悄拿走。

我原创,你原创,我们的内容世界才会更加精彩!

【所有原创内容版权均属TechTarget,欢迎大家转发分享。但未经授权,严禁任何媒体(平面媒体、网络媒体、自媒体等)以及微信公众号复制、转载、摘编或以其他方式进行使用。】

微信公众号

TechTarget微信公众号二维码

TechTarget

官方微博

TechTarget中国官方微博二维码

TechTarget中国

电子邮件地址不会被公开。 必填项已用*标注

敬请读者发表评论,本站保留删除与本文无关和不雅评论的权力。

相关推荐