MySQL > ERROR 1144 > Illegal GRANT/REVOKE command

What is it about the below query that's illegal??

http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html

GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON interchange.sharkey TO clearing_job@localhost;

ERROR 1144 (42000): Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used

Open in new window


Thanks,

http://www.t1shopper.com/
Geoff MillikanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Usama FoadIT ManagerCommented:
I think the problem here is in "LOCK TABLES" it is a globle or database levele privilege, you can't grant it ON spcific table. You must do it  a globle or in database level but not for table

GRANT SELECT, INSERT, UPDATE, DELETE ON interchange.sharkey TO clearing_job@localhost;

GRANT LOCK TABLES ON interchange TO clearing_job@localhost;

Open in new window

0
Geoff MillikanAuthor Commented:
I agree it would seem that way however the manual at the link below says that the context for "LOCK TABLES" is "tables."

http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html

So are you saying the manual is wrong? (Or maybe I'm reading it wrong?)
0
Usama FoadIT ManagerCommented:
The manual is not wrong, but not right too. :) You can say it is not clear enough. The manual report that the object which "LOCK TABLES" applied to is "table", unfortunately, it did not clarify that it can not granted per table as it is a global / database level privilege. Any way, this was reported before as bug and the need for updating documentation was mentioned but not don yet. See the following link for this report

http://bugs.mysql.com/bug.php?id=45354
      
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.