- Rongsen.Com.Cn 版权所有 2008-2010 京ICP备08007000号 京公海网安备11010802026356号 朝阳网安编号:110105199号
- 北京黑客防线网安工作室-黑客防线网安服务器维护基地为您提供专业的
服务器维护
,企业网站维护
,网站维护
服务 - (建议采用1024×768分辨率,以达到最佳视觉效果) Powered by 黑客防线网安 ©2009-2010 www.rongsen.com.cn
作者:黑客防线网安MYSQL维护基地 来源:黑客防线网安MYSQL维护基地 浏览次数:0 |
假设你的启动脚本是/etc/init.d/mysql 那么找到$bindir/safe_mysqld这行,加上如下参数
-O max_connections=1000 -O wait_timeout=500 -O interactive_timeout=500
当然,得根据你的实际情况加以修改,不过默认值对于我们公司这样负载的服务器是不可想象的……
现在,你的MySQL启动文件有可能看起来像这样:
............
$bindir/safe_mysqld --user=mysql --datadir=$datadir --pid-file=$pid_file -O max_connections=1000 -O wait_timeout=500 -O interactive_timeout=500&
............
修改完成之后,重启MySQL即可,注意一定要先使用mysqladmin shutdown 服务器。
推荐在my.cnf中配置这些参数。
如果你有MySQL的源代码版本,你可以在support-files目录下找到my-huge.cnf, my-large.cnf分别打开看看,选择适合你的那个文件
抄一段话:
# You can copy this file to
# /etc/my.cnf to set global options,
# mysql-data-dir/my.cnf to set server-specific options (in this
# installation this directory is @localstatedir@) or
# ~/.my.cnf to set user-specific options.
#
# One can in this file use all long options that the program supports.
# If you want to know which options a program support, run the program
# with --help option.
我要申请本站:N点 | 黑客防线官网 | |
专业服务器维护及网站维护手工安全搭建环境,网站安全加固服务。黑客防线网安服务器维护基地招商进行中!QQ:29769479 |