MYSQL. ARGH! Please can someone help?

Hi everyone

I have this php script to test if i can connect to the mysql database:

<?php echo $_SERVER['SCRIPT_NAME']."<BR>"; ?>
<?php
	echo "<b>IT WORKS</b><BR><BR>";
	$user = "root";
	$passwd = "*****";
$connect = mysql_connect('localhost', $user, $passwd)
	or die('Could not connect: ' . mysql_error());
echo ' <b>step 1: </b> connected <BR>';
?>

When i test this uploaded file i get this error message:

Could not connect: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

I’m not too good with mysql, what does it mean and how can i solve it?

Please help, im really struggling
Thanks