Privileges Problem
Posted: Fri Jun 13, 2003 4:45 am
I recently upgraded from MySQL 3.23 to 4.0.13. Everything seemed okay at first but later I noticed that one of my PHP scripts stopped working.
When I display the errors I saw that the account I was using to perform a process was being denied access.
The account is for updating a table. It had update and insert privileges but the error was claiming that it was being denied access to the 'Select' command. This account didn't require the 'select' command under previous versions and the PHP code does not do any selecting. When I granted it 'select' permission is worked. Why would this be?
Below is the code that is being used.
The script is working now but I don't want this account to have select privs. Can someone tell me what's going on here?
I would appreciate any help you can give me.
Thank you,
Paul
When I display the errors I saw that the account I was using to perform a process was being denied access.
The account is for updating a table. It had update and insert privileges but the error was claiming that it was being denied access to the 'Select' command. This account didn't require the 'select' command under previous versions and the PHP code does not do any selecting. When I granted it 'select' permission is worked. Why would this be?
Below is the code that is being used.
Code: Select all
# update the status for server activity in status tables
function update_status($machine_name, $rpl_last_event)
{
$db = mysql_connect("localhost","eventloader","eventloader");
mysql_select_db("mimi",$db);
$update="UPDATE status SET rpl_last_event='".$rpl_last_event."' WHERE machine_name='".$machine_name."'";
$result = mysql_query($update);
echo mysql_errno()."\n"; # debug
echo mysql_error()."\n"; # debug
} # end update_status()I would appreciate any help you can give me.
Thank you,
Paul