I\'ve seen a few errors like this, but I found no answer.
Unable to connect to database: Access denied for user \'\'@\'localhost\' to database \'socialdb\'
even if you are not having a user. there exist 'root' user so use it
$con = mysql_connect('localhost','root','');