How to Solve Vbulletin 4 Database Error if you are using Shared Hosting

I am running Vbulletin 4 Forum and i brought hosting in Hostgator as per i know they are simply best great support and 100% uptime. My forum is up from Last 3 months day by day my forum started getting good traffic and members but after few days i have started to face database error i was getting around 30-70 database error emails actually Hostgator shared hosting allowed 25 Peoples to access Database at one time if more than 25 try to use database many of them will get database error and also it make web page bit slow the problem look like this one.

Database error in vBulletin :
mysql_connect() [<a href=’function.mysql-connect’>function.mysql-connect</a>]: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)
/home/XXXXXXXXX/public_html/forum/includes/class_core.php on line 312
MySQL Error   :
Error Number  :
Request Date  : Monday, December 7th 2009 @ 02:49:41 AM
Error Date    : Monday, December 7th 2009 @ 02:49:41 AM
Referrer      :
IP Address    : 194.8.75.251
Username      :
Classname     : vB_Database
MySQL Version :
But while surfing net i have found solutation on Net VB actually have inbulte solutation their is one setting we need to make solve this problem Open Confug.php file from Include Folder and then search for Persistent connections and turn it on
//    ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
//    This option allows you to turn persistent connections to MySQL on or off.
//    The difference in performance is negligible for all but the largest boards.
//    If you are unsure what this should be, leave it off. (0 = off; 1 = on)
$config[‘MasterServer’][‘usepconnect’] = 0;
By Default it is off now replace 0 with 1.
Replace above code with
//    ****** MASTER DATABASE PERSISTENT CONNECTIONS ******
//    This option allows you to turn persistent connections to MySQL on or off.
//    The difference in performance is negligible for all but the largest boards.
//    If you are unsure what this should be, leave it off. (0 = off; 1 = on)
$config[‘MasterServer’][‘usepconnect’] = 1;
File Location Open FTP account or File Manager and then go to Forum root >> Include >> Open Config.php
Now all things are working fine no more database errors i guess those have big board and facing DB error this setting will help them out.