472,133 Members | 1,184 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

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 2164

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.