# MYSQL. ARGH! Please can someone help?

**URL:** <https://forum.kirupa.com/t/mysql-argh-please-can-someone-help/178126>\
**Category:** Uncategorized\
**Created:** [February 7, 2006, 9:28pm UTC](https://forum.kirupa.com/t/mysql-argh-please-can-someone-help/178126 "2006-02-07T21:28:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iso\_Rob](https://avatars.discourse-cdn.com/v4/letter/i/c68b51/32.png) [@Iso\_Rob](https://forum.kirupa.com/u/Iso_Rob)\
**Post date:** [February 7, 2006, 9:28pm UTC](https://forum.kirupa.com/t/mysql-argh-please-can-someone-help/178126/1 "2006-02-07T21:28:29Z")

</div>

Hi everyone

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

```php
<?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
