【问题标题】:CREATE command denied to user in Knime database writer nodeKnime 数据库写入器节点中的用户拒绝 CREATE 命令
【发布时间】:2017-10-27 16:47:01
【问题描述】:

在新的 KNIME 工作流程中。我创建了一个新的数据库连接节点和一个新的 Database Writer 节点,它接受来自 CSV 读取器节点的数据。 数据库连接节点执行成功。 当我执行数据库写入器节点时,我收到 CREATE command is denied 错误。

Database connector节点的配置如下: 数据库 URL : jdbc:mysql://localhost:3306/hello_knime_database
用户名 : test
密码:测试

mysql 配置:

$ mysql -u test -p
mysql> show databases;
+----------------------+
| Database             |
+----------------------+
| information_schema   |
| hello_knime_database |
+----------------------+
2 rows in set (0.00 sec)
mysql> show grants;
+--------------------------------------------------------------------------
-------------------+
| Grants for test@localhost                                                                    
|
+--------------------------------------------------------------------------
-------------------+
| GRANT USAGE ON *.* TO 'test'@'localhost'                                                    
|
| GRANT ALL PRIVILEGES ON `hello_knime_database`.* TO 'test'@'localhost'                      
|
| GRANT ALL PRIVILEGES ON `hello_knime_database`.`hello_knime_database` TO 
'test'@'localhost' |
+--------------------------------------------------------------------------
-------------------+
3 rows in set (0.01 sec)

数据库写入器配置:
端口 1 输入:大约 32000 行 15 列的数据表。
端口 2 输入:数据库连接器
表名:你好

KNIME 版本:3.3.2

当我执行 Database Writer 节点时,我得到:

ERROR Database Writer      0:3        Execute failed: CREATE command denied to user 'test'@'localhost' for table 'hello'

有什么线索可以说明造成这种情况的原因吗?

【问题讨论】:

  • 通过将数据库名称附加为前缀来添加完全限定的表名称,例如:hello_knime_database.hello 无效。

标签: mysql database knime


【解决方案1】:

来自MySql

授权表重新加载会影响每个现有客户端的权限 连接如下: 表和列权限更改在客户端的下一个请求时生效。 数据库权限更改在客户端下次执行 USE db_name 语句时生效。

Note
Client applications may cache the database name; thus, this effect may not be visible to them without actually changing to a different  database or flushing the privileges.

全局权限和密码对于连接的客户端不受影响。 这些更改仅对后续连接生效。

【讨论】:

  • 感谢您的回答! The Database privilege changes take effect the next time the client executes a USE db_name statement。我不知道在 KNIME 中这样做的直接方法是什么。我所做的是创建一个数据库阅读器并通过将查询设置为USE hello_knime_database 来配置它,这就成功了!
  • 您在 MySQL 文档中找到答案的聪明方法给我留下了深刻的印象。您能否就您如何搜索答案以及您使用了哪些关键字向我们提供一些提示?最好的问候,
  • @mtleis 很高兴听到您的问题已解决。 :-) 。我以前遇到过这种情况,我已经知道这个问题了。谢谢
猜你喜欢
  • 2012-04-10
  • 1970-01-01
  • 2011-07-12
  • 1970-01-01
  • 1970-01-01
  • 2011-09-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多