Xaprb

Stay curious!

Did you know Sphinx can act like a MySQL server?

with 6 comments

Peter wrote about this recently, but I don’t know if it was really clear what was going on.

Point One: Sphinx can be contacted by the MySQL protocol. Not “as a MySQL storage engine.” Not “from MySQL.” It understands the MySQL protocol itself. So from the protocol point of view, the Sphinx search daemon can look just like a MySQL server.

Point Two: Sphinx understands a SQL-like query language. Don’t be fooled. You’re not writing SQL. It just looks like you are.

Point Three: Because of point One and point Two, you can use the mysql command-line client program to talk directly to Sphinx, with absolutely no MySQL server anywhere in sight. This also means you can connect to Sphinx from your application and query it, exactly like connecting to a MySQL server and querying it.

Go take a look at Peter’s blog post. He’s not writing MySQL queries. He’s writing queries to Sphinx.

Now think about how cool this is — how easy this is to integrate with your code that already communicates with MySQL. Is there any other external full-text search system that masquerades as a MySQL server? I don’t know of one.

Further Reading:

Written by Xaprb

April 28th, 2009 at 11:15 pm

Posted in SQL

Tagged with , ,

6 Responses to 'Did you know Sphinx can act like a MySQL server?'

Subscribe to comments with RSS

  1. Hi Baron–your link to Sphinx should be http://www.sphinxsearch.com/. Cheers, Robert

    Robert Hodges

    29 Apr 09 at 12:51 am

  2. Your post made me wonder if Sphinx should speak Drizzle protocol ;)

    I keep hearing awesome things about sphinx, I am hoping to get to play with it sometime soon.

    Brian Aker

    29 Apr 09 at 1:51 am

  3. That is awesome.

    Justin Swanhart

    29 Apr 09 at 2:37 am

  4. Fixed the link, thanks Robert. Brian, I was thinking the same thing about the Drizzle protocol!

    Xaprb

    29 Apr 09 at 8:20 am

  5. One of the reasons we went with Sphinx over Solr is how easy it is to configure and use. This rc2 release brought that to a whole new level though!

  6. I am so glad SQL people are seeing the value in Sphinx — it’s just much better designed for full-text searching than any flavor of RDBMS. Honestly, cheered up my whole day.

    Avi Rappoport

    1 Sep 09 at 7:13 pm

Leave a Reply