VBB Forum often appears this error:
> Database Error appears in Vbulletin:
> Link-id == false, Connect Failed
> mysql error:
> mysql error number: 0
Later, I found a message in Google, I found this post in the official Forum:
http://www.vbulletin.com/forum/showthread.php?t=41678
I know that I have a problem with my mysql connection. This post said:
Link-id == false, connection 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 $ usPConnect = 0;
IF You Still Get The Errors After Making This Change, The You'll Need To ask your host to increase the amount of mysql connections the the mysql server.
To know your MySQL settings, you can log in to mySQL, execute the command:
> show status; check the current state
> show variables; check the current mysql parameter setting
Check the parameters of mysql: max_connections defaults to 100, you need to change this parameter.
There are many posts on the Internet suggest to set it to the largest: 32000
The maximum number of connections allowed by actual mysql is only to 16384
There are two ways to modify this parameter:
1. Modify my.cnf file (or 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 = 4MMYISAM_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
------------------------------------
Join the red word:
Max_Connections = 32000
Follow the mysql: $ / sbin / service mysql restart and log in into MySQL as root, enter the command show variables to check if the max_connections parameter has taken effect. 2. I have not tested the startup parameters of Safe-MySQLD.