I'm running mariadb-server v10.2.33-1 on two openwrt-qemu systems. I want a remote user to achieve LOCK TABLE on a particular table.
In the local mysql server, I have created a remote user and granted LOCK TABLES privilege using the following commands:
CREATE USER 'root'@'192.168.%' IDENTIFIED BY 'root';
GRANT SELECT ON `qkd`.`RawKeyStatus` TO 'root'@'192.168.%';
GRANT LOCK TABLES ON `qkd`.* TO 'root'@'192.168.%';
FLUSH PRIVILEGES;
Upon running SHOW GRANTS
in the remote user system, I can notice the LOCK TABLES
privilege has been assigned to 'root'@'192.168.%'
. The remote user also has SELECT
privilege on the table qkd.RawKeyStatus
.
However LOCK TABLE qkd.RawKeyStatus READ;
command in the remote system fails with the error:
ERROR 1044 (42000): Access denied for user 'root'@'192.168.%' to database 'qkd'
What am I missing ?