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<br>";
$link = mysql_pconnect('localhost', 'todd', 'ariste');
echo mysql_error() . "<br>";
if ($link) {
echo "Connected<br>";
if (mysql_select_db('sfyc', $link)) {
echo "Selected sfyc<br>";
} else {
echo mysql_error() . "<br>";
echo "Cannot select sfyc<br>";
}
} else {
echo "Cannot connect<br>";
}
echo "Done<br>";
?>