Mysql客户端有权访问,密码为true。 mysql用户拥有所有数据库的所有权限:
我有错误:
/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
答案 0 :(得分:0)
在我的情况下,当我遇到这样的错误时,那只是MySQL的错误密码。
我的用户密码包含'#'
或'!'
之类的符号。
我从密码中删除了这些字符后,一切开始正常工作!