Reading Error: socket '/var/lib/mysql/mysql.sock'

Reading Error: socket '/var/lib/mysql/mysql.sock'

Post by k3chees » Sun, 08 Jul 2007 02:38:03

an't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

FYI I did this to solved the problem but it didn't work: the only thing is
that I'm running MySQL 5.0 (I have a my.ini not my.cfg) and I put the var
folder in the following dir C:\Program Files\MySQL\MySQL Server
5.0\var\lib\mysql. I also modified my PHP.ini to reflect new socket

What really bothers me is that all was fine until yesterday and my AMP setup
for localhost works fine. Only when I upload to Webhost i get the socket
The only thing I did was add the following include file @ the top of all my
admin pages.
include file
if($_SESSION['auth'] != "yes")
header("Location: AdminForm.php");
AdminForm looks like:
<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ADMIN LOGIN</title>
<style type="text/css">
.style3 {font-size: 11pt}
body {
background-color: #F5F5F5;
<link href="css/site.css" rel="stylesheet" type="text/css" />
<br />
<br />
<br />
<table width="611" height="310" border="1" align="center">
<td align="center" bordercolor="#000099" bgcolor="#FFFFFF">

<div align="center"><br />
<img src="../images/logoBig.jpg" width="218" height="208" /><br />
<br />
if(@$_SESSION['sight'] == "error")
{echo "<div class='ermess3'>Username and/or Password are
<br />
<br />

<div align="center">
<form action="AdminFormVal.php" method="post" name="adminForm">
<label for="uname">USERNAME</label>

<input type="text" name="uname" maxlength="25" />
<br />
<br />
<label for="uname">PASSWORD</label>

<input type="password" name="pword" maxlength="25" />
<br />
<br />
<input type="hidden" name="sight" value="" maxlength="25" />
<br />
<input name="submit" type="submit" id="submit" value="Submit" />
</div> </td>
END ADMIN FORM===========================================================

Also if I change the AdminFormVal.php beginning 'if' clause to $_SESSION
instead of $_POST, I mysteriously don't get the mysql.sock error. But script
does nothing when I do that of course.
AdminFormVal.php file looks like this:

<?php session_start();
$checkUnameQuery = "SELECT uname FROM admin WHERE uname ='$_POST[uname]'";
$checkUnameQueryResult = mysql_query($check

Reading Error: socket '/var/lib/mysql/mysql.sock'

Post by k3chees » Sun, 08 Jul 2007 04:37:28

ROBLEM SOLVED had wrong db connection file on HOST SERVER.

""kvigor"" < XXXX@XXXXX.COM > wrote in message
news: XXXX@XXXXX.COM ...