我使用JOOQ 3.6.2和mysql 5.5。
我想在适当的许可下使用JOOQ。 我的应用程序使用SELECT,UPDATE,INSERT和DELETE。
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, LOCK TABLES ON `example`.* TO 'example_user'@'192.168.0.14'
Jooq抛出DataAccessException:
SELECT command denied to user 'example_user'@'192.168.0.14'
JOOQ重新启动了“读取mysql元数据”,但我无法向用户添加授权。
mysql> GRANT ALL ON information_schema.* TO 'example_user'@'192.168.0.14';
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema'
mysql> SHOW GRANTS FOR root@localhost;
+---------------------------------------------------------------------+
| Grants for root@localhost |
+---------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION |
| GRANT PROXY ON ''@'' TO 'root'@'localhost' WITH GRANT OPTION |
+---------------------------------------------------------------------+
没有其他方法可以允许所有人吗?
mysql> GRANT ALL ON *.* TO 'example_user'@'192.168.0.14';