Discussion:
Grant lock tables on single table gives ERROR 1144
(too old to reply)
Serman D.
2007-04-26 10:51:01 UTC
Permalink
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.

mysql> SELECT VERSION()\G
*************************** 1. row ***************************
VERSION(): 4.1.20
1 row in set (0.00 sec)

mysql> SELECT CURRENT_USER()\G
*************************** 1. row ***************************
CURRENT_USER(): ***@localhost
1 row in set (0.02 sec)

mysql> CREATE DATABASE grant_test;
Query OK, 1 row affected (0.04 sec)

mysql> USE grant_test;
Database changed
mysql> CREATE TABLE t (i INTEGER PRIMARY KEY NOT NULL);
Query OK, 0 rows affected (0.02 sec)

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

mysql> GRANT 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
mysql> GRANT LOCK TABLES ON grant_test.* TO grant_test_user IDENTIFIED
BY 'foobar';
Query OK, 0 rows affected (0.03 sec)

--
Serman D.
Gordon Burditt
2007-04-27 04:22:43 UTC
Permalink
Post by Serman D.
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.
Serman D.
2007-04-27 06:27:46 UTC
Permalink
Post by Gordon Burditt
Post by Serman D.
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.

Continue reading on narkive:
Loading...