php error for no reason?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tomsace
Forum Contributor
Posts: 167
Joined: Thu Jan 01, 2009 8:07 pm

php error for no reason?

Post by tomsace »

I am recieving an error in my log, and I see no error on the site, or in the script...
Heres the error:
[27-Jun-2009 17:16:33] PHP Warning: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: Access denied for user 'tomsace'@'localhost' (using password: NO) in /home/tomsace/public_html/home.php on line 11
[27-Jun-2009 17:16:33] PHP Warning: mysql_query() [<a href='function.mysql-query'>function.mysql-query</a>]: A link to the server could not be established in /home/tomsace/public_html/home.php on line 11
Here is line 10 & 11 as to where it is reffering:

Code: Select all

$query = "SELECT * FROM games WHERE visible='1' ORDER BY id DESC limit 9";
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: php error for no reason?

Post by requinix »

So is tomsace@localhost allowed to connect to the database? Without a password?
Post Reply