sphinxsearch:错误:index'ad1_offers':sql_connect:拒绝用户访问

问题描述 投票:1回答:2

Mysql客户端有权访问,密码为true。 mysql用户拥有所有数据库的所有权限:

  • GRANT SELECT,
  • 插入,
  • UPDATE,
  • 删除,
  • 创建,
  • 下降,
  • RELOAD,
  • 关掉,
  • 处理,
  • 参考文献,
  • 指数,
  • ALTER,
  • 显示数据库,
  • 超,
  • 创建临时表,锁表,
  • 执行,
  • 复制奴隶,复制客户,
  • 创建视图,显示视图,
  • 创造常规,改变常规,
  • 创建用户,
  • 事件,
  • 触发器。到'ad1'@'%'

我有错误:

/usr/bin/indexer   --all
Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'ad1_offers'...
ERROR: index 'ad1_offers': sql_connect: Access denied for user ad1'@'192.168.0.177' (using password: YES) (DSN=mysql://ad1:***@192.168.0.177:3306/ad1).

要么

/etc/init.d/sphinxsearch start
Starting sphinxsearch: Sphinx 2.2.10-id64-release (2c212e0)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file '/etc/sphinxsearch/sphinx.conf'...
listening on 192.168.0.177:9312
listening on 192.168.0.177:9306
precaching index 'ad1_offers'
WARNING: index 'ad1_offers': preload: failed to open /var/lib/sphinxsearch/data/    ad1_offers.sph: No such file or directory; NOT SERVING
FATAL: no valid indexes to serve ERROR.

sphinx.conf中:

    type                    = mysql

    sql_host                = 192.168.0.177
    sql_user                = ad1
    sql_pass                = ....
    sql_db                  = ad1
    sql_port                = 3306  # optional, default is 3306
sphinx
2个回答
0
投票

错误:index'ad1_offers':sql_connect:用户ad1'@'192.168.0.177拒绝访问'(使用密码:是)(DSN = mysql:// ad1:***@192.168.0.177:3306 / ad1)。

这意味着索引器甚至无法连接到mysql。它更多地是关于用户现有和密码正确,而不是用户拥有的实际权限。

您可以使用mysql命令行客户端连接到您的数据库吗?


0
投票

在我的情况下,当我遇到这样的错误时,它只是MySQL的错误密码。我的用户密码包含'#''!'等类型的标志。从密码中删除这些字符后,一切都开始工作了!

© www.soinside.com 2019 - 2024. All rights reserved.