Page 1 of 1

php error for no reason?

Posted: Sat Jun 27, 2009 5:27 pm
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());

Re: php error for no reason?

Posted: Sat Jun 27, 2009 7:51 pm
by requinix
So is tomsace@localhost allowed to connect to the database? Without a password?