when running this code
<?php
$con = mysql_connect("localhost","Grant","grant");
if (!$con)
{
die('Could not connect: ' . mysq_error());
}
if (mysql_query("CREATE DATATBASE my_db",$con))
{
echo "Database Created";
}
else
{
echo "Error creating database: " . mysqlerror();
}
mysql_close($con);
?>
it prints
Could not connect: No such file or directory
I'm not sure what I'm doing wrong.... I'm running this locally under a user account on Mac OSX 10.7.4
edit: Thanks for catching the non initialization, but it's still not running