苏州阊胥路北大青鸟 北大青鸟苏州阊胥路标准化校区
  书香社区·书香博客·联系我们  
全国免费电话:400-888-1050
 
首页 | 新闻动态 | 学校介绍 | 课程详解 | 师资力量 | 学习园地 | 就业广场 | 开发技术 | 校区招聘
  在线报名 在线留言  
   
您的位置:首页 - 数据库技术  
MySQL的Daemon启动参数  
2009-6-24  发布人:温金龙  浏览次数::
假设你的启动脚本是/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.

 
上一篇:C#实现根据域名查询ip实例
下一篇:Java初学者都必须理解的六大问题
 
设为首页 | 加入收藏 | 联系我们 | 联系站长 | 友情链接
报名咨询:0512-65566661 65566662   备案许可证号:苏ICP备09076008号
地址:苏州市阊胥路483号创元科技园6号楼1层(干将西路友通数码港向北100米)
交通路线:6、7、7路区间、64、70、88、262、300、303、304、307、318、332、333、333路龙池专线、
522、800、921、932、949.(小日晖桥北站)
 
在线客服
在线客服系统