Cannot access DB

Cannot access DB

am 21.04.2007 02:53:17 von Todd Cary

I have MySQL 4.3 running on a Red Hat server.

The DB files have permissions -rw-rw---- with the Owner and Group
mysql.

Using mysqladmin, I can access the DB as either root or as the
user, "todd".

With this script, I get this error:

Access denied for user 'todd'@'localhost' to database 'sfyc'

I am not sure what to check/change in the user or db tables.

Many thanks for any assistance...

Todd

echo "Ready to open sfyc
";
$link = mysql_pconnect('localhost', 'todd', 'ariste');
echo mysql_error() . "
";
if ($link) {
echo "Connected
";
if (mysql_select_db('sfyc', $link)) {
echo "Selected sfyc
";
} else {
echo mysql_error() . "
";
echo "Cannot select sfyc
";
}
} else {
echo "Cannot connect
";
}
echo "Done
";
?>