467,228 Members | 1,433 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,228 developers. It's quick & easy.

Grant lock tables on single table gives ERROR 1144

Hi,

Tested on MySQL 4.1.20 and 5.0.33 with similar results. I don't
understand why I cannot grant LOCK TABLES on a single table, while
granting LOCK TABLES on all tables work fine.

mysqlSELECT VERSION()\G
*************************** 1. row ***************************
VERSION(): 4.1.20
1 row in set (0.00 sec)

mysqlSELECT CURRENT_USER()\G
*************************** 1. row ***************************
CURRENT_USER(): root@localhost
1 row in set (0.02 sec)

mysqlCREATE DATABASE grant_test;
Query OK, 1 row affected (0.04 sec)

mysqlUSE grant_test;
Database changed
mysqlCREATE TABLE t (i INTEGER PRIMARY KEY NOT NULL);
Query OK, 0 rows affected (0.02 sec)

mysqlGRANT SELECT ON grant_test.t TO grant_test_user IDENTIFIED BY
'foobar';
Query OK, 0 rows affected (0.12 sec)

mysqlGRANT LOCK TABLES ON grant_test.t TO grant_test_user IDENTIFIED
BY 'foobar';
ERROR 1144 (42000): Illegal GRANT/REVOKE command; please consult the
manual to see which privileges can be used
mysqlGRANT LOCK TABLES ON grant_test.* TO grant_test_user IDENTIFIED
BY 'foobar';
Query OK, 0 rows affected (0.03 sec)

--
Serman D.

Apr 26 '07 #1
  • viewed: 13359
Share:
2 Replies
>Tested on MySQL 4.1.20 and 5.0.33 with similar results. I don't
>understand why I cannot grant LOCK TABLES on a single table, while
granting LOCK TABLES on all tables work fine.
Privileges exist at one or more of 4 levels: global, database,
table, and column. LOCK TABLES exists only at the global and database
levels.
Apr 27 '07 #2
On Apr 27, 6:22 am, gordonb.6t...@burditt.org (Gordon Burditt) wrote:
Tested on MySQL 4.1.20 and 5.0.33 with similar results. I don't
understand why I cannot grant LOCK TABLES on a single table, while
granting LOCK TABLES on all tables work fine.

Privileges exist at one or more of 4 levels: global, database,
table, and column. LOCK TABLES exists only at the global and database
levels.
Gordon, Thanks for the clarification.

--
Serman D.

Apr 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by | last post: by
reply views Thread by Charles Cantrell | last post: by
3 posts views Thread by db2group88@yahoo.com | last post: by
2 posts views Thread by TheTamdino | last post: by
6 posts views Thread by john_woo@canada.com | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.