Hi
Can anyone help with this problem .. I get this mesg when i try inserting records in a mysql db ..
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in /usr/home/qna/public_html/submittedq2.php on line 344
Warning: MySQL: A link to the server could not be established in /usr/home/qna/public_html/submittedq2.php on line 344
Couldn't execute query.
It does insert the record.
But the thing i dont understand is that the user connecting to the db is NOT root, but another user that i created that has select,insert permissions..
The line of code it refers to is below :
$sql_result = mysql_query($sql) or die("Couldn't execute query.");
and the sql that its suppossed to run is a basic select statement to retrieve records. That select query also runs on other pages with no problems whatsoever (sql below)
$sql = "select * from qnaquestions where Answered = 'Yes' ORDER BY Date_Answered DESC LIMIT 5";
Its really puzzling..
Any ideas/suggestions ?
Thanks
Can anyone help with this problem .. I get this mesg when i try inserting records in a mysql db ..
Warning: MySQL Connection Failed: Access denied for user: 'root@localhost' (Using password: NO) in /usr/home/qna/public_html/submittedq2.php on line 344
Warning: MySQL: A link to the server could not be established in /usr/home/qna/public_html/submittedq2.php on line 344
Couldn't execute query.
It does insert the record.
But the thing i dont understand is that the user connecting to the db is NOT root, but another user that i created that has select,insert permissions..
The line of code it refers to is below :
$sql_result = mysql_query($sql) or die("Couldn't execute query.");
and the sql that its suppossed to run is a basic select statement to retrieve records. That select query also runs on other pages with no problems whatsoever (sql below)
$sql = "select * from qnaquestions where Answered = 'Yes' ORDER BY Date_Answered DESC LIMIT 5";
Its really puzzling..
Any ideas/suggestions ?
Thanks