简体   繁体   English

Apache Nifi 中用户“user”@“localhost”(使用密码:YES)的访问被拒绝

[英]Access denied for user 'user'@'localhost' (using password: YES) in Apache Nifi

I am trying to use Apache Nifi for loading tweets and storing them in memsql database.我正在尝试使用 Apache Nifi 加载推文并将它们存储在 memsql 数据库中。 Loading and processing tweets works great, but when I come to steps of inserting to memsql, more precise when flow comes to ConvertJSONToSql processor, it throws error.加载和处理推文效果很好,但是当我执行插入到 memsql 的步骤时,当流程涉及到 ConvertJSONToSql 处理器时更精确,它会引发错误。

CET错误

This is my setup for JDBC Connection Pool:这是我对 JDBC 连接池的设置:

连接详情

Memsql is running on Docker, whose cluster I initialized like this: Memsql 运行在 Docker 上,我对它的集群进行了如下初始化:

docker run -i --init `
    --name memsql-ciab `
    -e LICENSE_KEY=$env:LICENSE_KEY `
    -p 3308:3306 -p 8090:8080 `
    memsql/cluster-in-a-box

Port 3306 and 8080 were already taken.端口 3306 和 8080 已经被占用。 I also made sure that myuser has all permissions, both to host 'localhost' and '127.0.0.1', as shown in grants.我还确保 myuser 拥有托管“localhost”和“127.0.0.1”的所有权限,如授权中所示。 赠款

When I connect with Windows Powershell or on localhost:8090, both logins work for 'myuser' with password 'pass'.当我使用 Windows Powershell 或 localhost:8090 连接时,两个登录都适用于密码为“pass”的“myuser”。 Also both logins have permissions for database 'twitterDB'.此外,两个登录都具有数据库“twitterDB”的权限。 What I found weird is, in my Docker cluster I have database memsql, which in it has table users, but I can only run:我发现奇怪的是,在我的 Docker 集群中,我有数据库 memsql,其中有表用户,但我只能运行:

describe memsql.users;

Everything else throws error 'ERROR 1706 (HY000): Feature 'table names conflicting with metadata tables of the same name' is not supported by MemSQL.'.其他一切都会引发错误“错误 1706 (HY000):MemSQL 不支持功能‘表名与同名元数据表冲突’。”。 Also, in my JDBC Connection pool in Nifi, if I leave user and password empty, ConvertJSONToSql throws different error, which says that ''@'localhost' user doesn't have permissions for database 'twitterDB'.*.此外,在 Nifi 的 JDBC 连接池中,如果我将用户和密码留空,ConvertJSONToSql 会抛出不同的错误,即“@'localhost' 用户没有数据库 'twitterDB'.* 的权限。

I have been struggling for some time now with this problem, and I don't know what else to try so any help would be great.我已经为这个问题苦苦挣扎了一段时间,我不知道还能尝试什么,所以任何帮助都会很棒。

Let's separate the concerns of authentication fail and insert fail.让我们将身份验证失败和插入失败的问题分开。 Try changing Apache Nifi to use the user root (no password) and see if the inserts succeed.尝试将 Apache Nifi 更改为使用用户root (无密码)并查看插入是否成功。 Also try inserting data using sql commands from MemSQL Studio ( localhost:8090 in your setup) or from powershell.还可以尝试使用来自 MemSQL Studio(在您的设置中为localhost:8090 )或来自 powershell 的 sql 命令插入数据。 Try this with each login: root (no password) and as myuser .每次登录时都试试这个: root (无密码)和作为myuser These tests should help us learn more.这些测试应该可以帮助我们了解更多。

You didn't specify the Docker setup, so assuming Docker Desktop or another local Docker, try increasing CPUs to 4 and RAM to 4 or 8 gigs.您没有指定 Docker 设置,因此假设 Docker Desktop 或其他本地 Docker,请尝试将 CPU 增加到 4 并将 RAM 增加到 4 或 8 个演出。 I find the developer defaults are often smaller than what works well with cluster-in-a-box .我发现开发人员的默认设置通常比使用cluster-in-a-box效果好的要小。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mysql-1045-用户&#39;user&#39;@&#39;localhost&#39;的访问被拒绝(使用密码:是) - Mysql - 1045 - Access denied for user 'user'@'localhost' (using Password: Yes) 用户&#39;User&#39;@&#39;localhost&#39;的MySQL访问被拒绝(使用密码:是) - MySQL Access denied for user 'User'@'localhost' (using password: YES) 用户&#39;user&#39;@&#39;localhost&#39;的访问被拒绝(使用密码:是) - Access denied for user 'user'@'localhost' (using password: yes) 用户&#39;user&#39;@&#39;localhost&#39;的Mysql Access被拒绝(使用密码:是)“ openshift” - Mysql Access denied for user 'user'@'localhost' (using password: yes) “openshift” 用户 &#39;apache&#39;@&#39;localhost&#39; 访问被拒绝(使用密码:NO) - Access denied for user 'apache'@'localhost' (using password: NO) 使用MAMP拒绝用户&#39;root&#39;@&#39;localhost&#39;的访问(使用密码:是) - Access denied for user 'root'@'localhost' (using password: YES) using MAMP NetBeans 表示用户 &#39;root&#39;@&#39;localhost&#39; 的访问被拒绝(使用密码:YES) - NetBeans says that Access denied for user 'root'@'localhost' (using password: YES) MySqlException:用户&#39;altjenb&#39;@&#39;localhost&#39;的访问被拒绝(使用密码:是) - MySqlException: Access denied for user 'altjenb'@'localhost' (using password: YES) 访问被拒绝用户&#39;ODBC&#39;@&#39;localhost&#39; <using password: YES> - Access denied for user 'ODBC'@'localhost' <using password: YES> 用户&#39;dbtsorder&#39;@&#39;localhost&#39;的访问被拒绝(使用密码:是) - Access denied for user 'dbtsorder'@'localhost' (using password: YES)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM