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.
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
错误:index'ad1_offers':sql_connect:用户ad1'@'192.168.0.177拒绝访问'(使用密码:是)(DSN = mysql:// ad1:***@192.168.0.177:3306 / ad1)。
这意味着索引器甚至无法连接到mysql。它更多地是关于用户现有和密码正确,而不是用户拥有的实际权限。
您可以使用mysql
命令行客户端连接到您的数据库吗?
在我的情况下,当我遇到这样的错误时,它只是MySQL的错误密码。我的用户密码包含'#'
或'!'
等类型的标志。从密码中删除这些字符后,一切都开始工作了!