MySQL storage engine Sphinx

=> Sphinx Overview

Sphinx is MySQL storage engine which can be compiled with MySQL server 5.X version. It you want to compile with MySQL 5.0 series then you must have MySQL 5.0.22 or higher version, or MySQL 5.1.12 or higher in 5.1.x version.

Sphinx does not actually store any data itself. It is a built-in client which allows MySQL server to talk to searchd, run search queries, and obtain search results. All indexing and searching happen outside the MySQL.

=> Pre-Compile Package Requirements

You will need to install below package before compiling Sphinx

* autoconf
* automake
* libtool
* bison

=> Downloading, Installing and Compiling Sphinx

If you have already have an MySQL on you server then, there is no need to install it again just follow the “Installing Sphinx Add-On for already Installed MySQL”. But if you want to install a fresh copy of MySQl with Sphinx then follow the below stpes.

++  For MySQL 5.1 Series

1. Download the latest stable version of MySQL from “http://dev.mysql.com/downloads/” snd Sphinx from “http://sphinxsearch.com”



2. Untar the downloaded package.


3. In MySQL sources directory, create storage/sphinx directory and copy all files from Sphinx’s  mysqlse directory to MySQL’s storage/sphinx folder. E.g,

4. In MySQL sources directory, run below command

5. Now configure MySQL with Sphinx engine on “/usr/local/mysql-5.1” path.

6. Build and Install MySQL with Sphinx

++  For MySQL 5.0 Series

1. Download the latest stable version of MySQL from “http://dev.mysql.com/downloads/” snd Sphinx from “http://sphinxsearch.com”

2. Untar the downloaded package.

3. For MySQL 5.0 series first you wiil have to apply an patach which will be found on path “/usr/local/src/sphinx-0.9.8.1/ysqlse/sphinx.5.0.37.diff”.

4. In MySQL sources directory, run below command

5. IN MySQL sources directory, create sql/sphinx directory in and copy all files in mysqlse directory from Sphinx sources there.

6. Now configure MySQL with Sphinx engine on “/usr/local/mysql-5.0” path.

7. Build and Install MySQL with Sphinx



++ Installing Sphinx Add-On for already Installed MySQL

    *  For MySQL 5.1 and MySQL 5.0 series skip 1st and 2nd steps, but make sure you have latest copy of Sphinx.

=>  Checking Sphinx installation

To check whether Sphinx has been succesfully compiled into MySQL, run SHOW ENGINES query on MySQL SHELL. You should see a Sphinx to be present and “Support” column should contain “YES”.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: