469,076 Members | 1,437 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,076 developers. It's quick & easy.

Cannot access DB

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>";
?>
Apr 21 '07 #1
0 2106

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Thomas Barnet-Lamb | last post: by
6 posts views Thread by Grant | last post: by
10 posts views Thread by dermot | last post: by
3 posts views Thread by epearce301 | last post: by
reply views Thread by =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.