Connecting Tech Pros Worldwide Forums | Help | Site Map

Grant lock tables on single table gives ERROR 1144

Serman D.
Guest
 
Posts: n/a
#1: Apr 26 '07
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.


Gordon Burditt
Guest
 
Posts: n/a
#2: Apr 27 '07

re: Grant lock tables on single table gives ERROR 1144


>Tested on MySQL 4.1.20 and 5.0.33 with similar results. I don't
Quote:
>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.
Guest
 
Posts: n/a
#3: Apr 27 '07

re: Grant lock tables on single table gives ERROR 1144


On Apr 27, 6:22 am, gordonb.6t...@burditt.org (Gordon Burditt) wrote:
Quote:
Quote:
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.

Closed Thread


Similar MySQL Database bytes