Hello, everybody.
I just downloaded MySQL, completing my Apache-PHP-MySQL trio. I created a VERY basic php page to do a test connection to the MySQL server… it failed. I’ve been trying to figure out why the error’s occuring, but I need some help.
[I am running everything on a Mac OS 10.4 (Leopard)]
Here’s the code (I’ve excluded the outer html). I’ve replaced my password with “PASSWORD”
[code=php]
<?php
$con = mysql_connect(“localhost”,”phpUser”,”PASSWORD”);
if (!$con)
{
die(‘Could not connect: ‘ . mysql_error());
}
else
{
echo “<p>Good Job</p>”;
}
?>
I have a user set up in MySQL named “phpUser” with host “localhost” with password “PASSWORD”
Can anyone shed light on why this won’t work?
Thanks a bunch,
StPretz