MySQL error a lot of times

pspuser007

New Member
Hello all!

I am getting this MySQL error a lot of times. :(
Code:
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/"myusername"/dir/dirofforums/includes/class_core.php on line 311


What can I do?
What exactly is this problem?


Thank you.
 
upload again ur vbulletin file and set again ur config.php becarefull must true..if u need get the problem goto cpanel and goto phpmyadmin i thing ur msql not connected report to ur host
 
If you can not perform the following tweaks, you need to be talking to your Host Provider to do them for you... Your problem is the MySQL configuration on your server NOT YOU or ANYTHING you did!

To make your life easier, you can make a simple change to the MySQL configuration file /etc/my.cnf that will permanently set the socket file used by the mysql client. After making a backup copy of /etc/my.cnf, open it in your favorite editor. The file is divided into sections such as

Code:
[mysqld]
datadir=/usr/local/mysql/data
socket=/var/lib/mysql/mysql.sock



Code:
[mysql.server]
user=mysql
basedir=/usr/local/mysql



If there is not currently a section called [client], add one at the bottom of the file and copy the socket= line under the [mysqld] section such as:

Code:
[client]
socket=/var/lib/mysql/mysql.sock


If there is already a [client] section in the my.cnf file, add or edit the socket line as appropriate. You won’t need to restart your server or any other processes. Subsequent uses of the mysql client will use the proper socket file.
 
Back
Top