我有一个无法解决的 mysql 授权问题。
mysql> UPDATE frontier_remote.trident_update SET completed=NOW() WHERE mac_address="00:1b:24:a0:da:e9" AND completed IS NULL;
ERROR 1143 (42000): SELECT command denied to user 'trident_client'@'host-78-147-8-82.as13285.net' for column 'mac_address' in table 'trident_update'
mysql> SELECT mac_address from trident_update WHERE mac_address="00:1b:24:a0:da:e9" and completed is NULL;
+-------------------+
| mac_address |
+-------------------+
| 00:0:de:ad:be:ef |
+-------------------+
1 row in set (0.04 sec)
所以更新声称在选择中失败,但命令的选择部分似乎是独立工作的。
授权表中的相关条目如下所示:
GRANT USAGE ON *.* TO 'trident_client'@'%' IDENTIFIED BY PASSWORD 'shadow_password'
GRANT INSERT, UPDATE ON `frontier_remote`.* TO 'trident_client'@'%'
GRANT SELECT ON `frontier_test`.`trident_update` TO 'trident_client'@'%'
有什么想法吗?