Hi Sergei,

I can't think of anything else, but I would suggest checking the output of SHOW INNODB STATUS for clues, just in case the foreign key is causing an odd error message. I would not be surprised, as InnoDB FK error messages are sometimes hard to understand.

Cheers
Baron

Sergei wrote:
Hello,

Thanks for the answer!
I checked the thing you suggested:
1) output of SHOW GRANT is correct
2) the problematic table is not a view
3) no triggers - only foreign key constraint. "ADD CONSTRAINT `mydb2_table2_ibfk_1` FOREIGN KEY (`table2_user_id`) REFERENCES `table1` (`usr_id`) ON DELETE CASCADE". By the way I forgot to mention that engine is of course InnoDB.

Baron Schwartz wrote:
Hi Sergei,

Sergei wrote:
Hello,

I have a weird problem with privileges and deleting from tables.

I have a MySQL user that has only "mydb2" database specific privileges (no SUPER privileges). All tables were created prior to granting any privileges.

Privileges have been granted by this query:
"GRANT ALL PRIVILEGES ON `mydb2` . * TO 'user_mydb'@'%' WITH GRANT OPTION ;"

The problem is that I get "ERROR 1227 (42000): Access denied; you need the SUPER privilege for this operation" every time I try to delete from some tables of this database.

For instance, "delete from table1;" works, but "delete from table2;" doesn't!

Could anyone help me or point where to look for an answer?

Any help would be appreciated, thank you!

That is odd.  Some things I can think of:

1) check the output of SHOW GRANTS just to be sure.
2) Is one table a view?
3) are there any triggers on the tables?

Cheers.



--
Baron Schwartz
http://www.xaprb.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to