简体   繁体   English

完全导入Solr时访问被拒绝错误

[英]Access denied error when doing full import into Solr

I'm attempting to use Solr to run a full data import via the Solr admin interface. 我正在尝试使用Solr通过Solr管理界面运行完整的数据导入。 When I run it however, I get the following output: 但是,当我运行它时,得到以下输出:

"Indexing failed. Rolled back all changes."

On further inspection of the Solr logs, I can see that I'm getting the following error: 在进一步检查Solr日志时,可以看到出现以下错误:

Caused by: java.sql.SQLException: Access denied for user 'username'@'127.0.0.1' (using password: YES)

(Username replaced for security, full stack here ) (为安全起见,用户名已替换, 此处为完整堆栈)

Has anyone else had the same issue? 还有其他人遇到过同样的问题吗? I've double checked the database details (have accessed the database in question from the command line successfully). 我已经仔细检查了数据库的详细信息(已成功从命令行访问了有问题的数据库)。

I've also checked the privileges for the user and can confirm that it has all privileges granted for it on the database in question. 我还检查了该用户的特权,并可以确认该用户具有有关数据库的所有特权。

It turns out that it was related to privilieges for the database users. 事实证明,这与数据库用户的特权有关。 I had granted prvilieges to the user in the question, but had left out the "IDENTIFIED BY 'password'" part of the command. 我已向问题中的用户授予特权,但省略了命令的“ IDENTIFIED BY'password'”部分。

So this is what I needed to use: 这就是我需要使用的:

GRANT ALL PRIVILEGES ON *.* TO 'user'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;

Hope this helps someone else with the same problem. 希望这可以帮助其他遇到相同问题的人。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM