转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> MySql >> 正文
MySQL+VBB问题:Link-ID == false, connect failed         ★★★★

MySQL+VBB问题:Link-ID == false, connect failed

作者:闵涛 文章来源:闵涛的学习笔记 点击数:1085 更新时间:2009/4/22 20:48:53
VBB论坛经常出现这个错误:
> 数据库错误出现于 vBulletin :
> Link-ID == false, connect failed
> mysql 错误:
> mysql 错误号: 0

后来在 google 搜了一把,在VBB官方论坛找到这个帖子:http://www.vbulletin.com/forum/showthread.php?t=41678
才知道原来是mysql连接数的问题。该贴中说道:


Link-ID == false, connect failed or ''''Too many connections"
If you keep getting these errors:

Quote: Database error in vBulletin :

Link-ID == false, connect failed
mysql error:

mysql error number: or:
Quote: Too many connections It means that the MySQL server has exceeded it''''s maximum allowable database connections or is not available for some reason. In this case you can try turning off ''''persistant connections'''' in your config.php file to see if that helps:

PHP Code: // use persistant connections to the database
// 0 = don''''t use
// 1 = use
$usepconnect = 0;
If you still get these errors after making this change, then you''''ll need to ask your host to increase the amount of MySQL connections they allow or to check the status of the MySQL server.



要知道自己的mysql设置,可以 root 登录到mysql ,执行命令:
> show status; 查看当前状态
> show variables ; 查看当前 mysql 参数设置情况

检查 mysql 的参数: max_connections 默认是100的,需要更改这个参数。
网上很多帖子建议把它设置到最大:32000
实际 mysql 允许的最大连接数只去到 16384

修改这个参数有两种办法:
1。修改 my.cnf 文件(或者 my.ini)
------------------------------------------------
[mysqld]
port            = 3306
socket          = /var/lib/mysql/mysql.sock
#datadir         = /usr/local/mysql/data
 
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 16M
# Try number of CPU''''s*2 for thread_concurrency
thread_concurrency = 8

# Added by DannyKang 20050109
max_connections = 32000
------------------------------------

加入红色字的那句:max_connections = 32000
跟着重启mysql :
$ /sbin/service mysql restart

然后再次以 root 身份登录进 mysql ,输入命令 show variables 检查 max_connections 参数是否已经生效。


2。修改 safe-mysqld 的启动参数
这个办法,我没有测试过。



[VB.NET程序]--==vb6中用图片框任意大小播放AVI电影(New)==-…  [Web开发]TreeView节点互斥,autopostback=false的方法
[SyBase]Direct CONNECT  [ORACLE]Oracle用Start with...Connect By子句递归查询
[MySql]常见的mysql错误:mysql error:2002 cann,t conne…  [Sql Server]A problem when connect MSSQL with transaction.
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台