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

时间:2015-12-21 10:53:21

标签: sphinx

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

  • GRANT SELECT,
  • INSERT,
  • 更新,
  • 删除,
  • 创建,
  • DROP,
  • RELOAD,
  • SHUTDOWN,
  • PROCESS,
  • 参考,
  • INDEX,
  • ALTER,
  • SHOW DATABASES,
  • SUPER,
  • 创建临时表,LOCK表,
  • EXECUTE,
  • 复制奴隶,复制客户,
  • 创建视图,显示视图,
  • 创造常规,改变常规,
  • 创建用户,
  • EVENT,
  • 触发 TO' 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.

spnix.conf:

    type                    = mysql

    sql_host                = 192.168.0.177
    sql_user                = ad1
    sql_pass                = ....
    sql_db                  = ad1
    sql_port                = 3306  # optional, default is 3306

1 个答案:

答案 0 :(得分:0)

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