By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,657 Members | 1,094 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,657 IT Pros & Developers. It's quick & easy.

Grant lock tables on single table gives ERROR 1144

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
>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

P: n/a
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.