通过Linux命令行连接到SphinxQL

编程入门 行业动态 更新时间:2024-10-08 08:31:36
本文介绍了通过Linux命令行连接到SphinxQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我尝试通过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:mysql41

searchd守护程序正在运行:

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

本文发布于:2023-10-16 14:06:27,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497786.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:连接到   命令行   Linux   SphinxQL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!