分享、学习、提高
2007/07/24 13:25
运行正常的程序突然感觉很慢,在切换页面时还出现了一个这样的提示:
Error: Too many connections
Errno.: 1040

主要参考:http://www.itlearner.com/article/2007/3820.shtml
通过修改safe_mysqld源文件的方法来解决这个问题。

照文章所写的修改后,上传。

重启:
/bin/mysqladmin -u root -p shutdown
/bin/mysqld_safe --user=mysql &
居然提示:# -bash: ./mysqld_safe: 权限不够
给它权限:chmod 755 mysqld_safe
再启动,OK

另参考:http://dev.mysql.com/doc/refman/5.0/en/too-many-connections.html

UPDATE@@070827补充:
其实还有一种方法是直接修改启动参数,可能更方便些。最大连接数设置为500就行了,太大了服务器也受不了。

/usr/local/mysql/bin/mysqld_safe --max_connections=500 --max_connect_errors=50000 &
发表评论
表情
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]