我尝试通过Linux 命令行连接到 SphinxQL 服务器:
I am trying to connect to SphinxQL server through Linux command-line this way:
> mysql -P 9306 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)我的Sphinx配置文件有2个监听条目:
My Sphinx config file has 2 listen entries:
listen = 9312 listen = 9306:mysql41searchd守护程序正在运行:
searchd daemon is running:
> ps ax | grep searchd 10727 ? S 0:00 /usr/local/sphinx/bin/searchd 10728 ? Sl 0:00 /usr/local/sphinx/bin/searchd/ p>
Regular search queries work perfectly:
> /usr/local/sphinx/bin/search StackOverflow | more Sphinx 2.0.4-release (r3135) Copyright (c) 2001-2012, Andrew Aksyonoff Copyright (c) 2008-2012, Sphinx Technologies Inc (sphinxsearch) using config file '/usr/local/sphinx/etc/sphinx.conf'... index 'test1': query 'StackOverflow ': returned 2 matches of 2 total in 0.009 sec displaying matches: 1. document=1788212, weight=1797 id=1788212 ...那么,我做错了什么?如何访问SphinxQL控制台?
So, what I am doing wrong? How can I get access to SphinxQL console?
任何提示都将不胜感激。提前感谢!
Any hint will be appreciated. Thanks in advance!
推荐答案'mysql'客户端,将完全忽略-P param,如果它检测到mysql正在运行一个unix-socket。所以真的,即使你要求sphinxQL端口,你正在连接到mysql
the 'mysql' client, will totally ignore the -P param, if it detects mysql is running on a unix-socket. So really even though you ask for the sphinxQL port, you are connecting to mysql
使用
mysql -P9306 --protocol=tcp告诉客户端忽略插座。
to tell the client to ignore the socket.
专业提示:
mysql -P9306 --protocol=tcp --prompt='sphinxQL> '这是一个有用的持续提醒,你连接到sphinx而不是mysql:)
which serves as a useful ongoing reminder you are connected to sphinx not mysql :)
更多推荐
通过Linux命令行连接到SphinxQL
发布评论