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:
http://webyog.com/forums/lofiversion/index.php/t1367.html 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
location.

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
error
The only thing I did was add the following include file @ the top of all my
admin pages.
====================================
include file
<?php
session_start();
if($_SESSION['auth'] != "yes")
{
header("Location: AdminForm.php");
exit();
}
?>
//===========================================================
AdminForm looks like:
//===========================================================
<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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;
}
-->
</style>
<link href="css/site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br />
<br />
<br />
<table width="611" height="310" border="1" align="center">
<tr>
<td align="center" bordercolor="#000099" bgcolor="#FFFFFF">

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

<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" />
</form>
</div> </td>
</tr>
</table>
</body>
</html>
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();
if(isset($_POST['sight']))
{
include("connex.php");
$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 ...