Welcome to Geeklog, Anonymous Friday, March 29 2024 @ 10:59 am EDT

Geeklog Forums

Error


Anonymous

Anonymous
Does anybody know what to do about this error. Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/ckier/system/databases/mysql.class.php on line 104 Cannnot connect to DB server Thnaks in advance, Chris Kiernan
 Quote

swanny

Anonymous
You'll have to figure out whether or not '/var/lib/mysql/mysql.sock' exists or not, if it doesn't exist you'll have to figure out where mysql is configured to create it's socket file. Once you do that you can create a symlink in /var/lig/mysql/ to point to the actual socket file. The other option is to reconfigure mysql to create the socket file in /var/lib/mysql/.
 Quote

Status: offline

ndarlow

Forum User
Junior
Registered: 06/30/02
Posts: 31
Find the location of your mysql.sock file and put it into the $_DB_host variable of config.php. For my system, which places mysql.sock in /tmp/, the following is needed: $_DB_host = 'localhost:/tmp/mysql.sock'; There is no need to create a symlink from mysql.sock to where Geeklog thinks it should be. Regards, Neil Darlow M.Sc.
 Quote

Arthur

Anonymous
I don't have a mysql.sock file anywhere on my hard disk. It's supposed to be in /tmp/mysql.sock

I got that error ever since we had a power outage. Can I just create a file and then reboot? That doesn't seem to work for me. How exactly do you recreate the socket?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Make sure MySQL is actually running.

bye, Dirk
 Quote

All times are EDT. The time is now 10:59 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content