• DevOps
    Case Study

    How we built a resilient multi-account, multi-cloud solution for a Health Tech service provider!

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How we built a scalable Odoo solution for a Travel Tech service provider!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    How we built a scalable Odoo solution for TravelTech service provider!

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Contact Us

Connect with us!


LinkedInFacebookXInstagramYouTube

aws partneraws advanced partner
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy
How to enable Sphinx Search Engine to MySQL

How to enable Sphinx Search Engine to MySQL

Irshad K.

  • 7 min read
How to enable Sphinx Search Engine to MySQL

Generating audio, please wait...

Sphinx is a Linux and Windows based search engine service which allows full text searching of extremely large databases in a very efficient and quick manner We are here providing the steps for sphinx mysql integration . 

1. Identify the current version of MySQL

# type mysql
mysql is hashed (/usr/bin/mysql)
# rpm -qf /usr/bin/mysql
mysql-5.5.31-1.el6.remi.x86_64
The current version is  mysql-5.5.31-1.el6.remi.x86_64
2. Download the MySQL source file 

As you already know, the current MySQL lacks Sphinx  support and our aim is to make the installation with the features of Sphinx. To enable an additional feature, we need to customize the core binary of the application. Which can only be achieved through configuration of the source files available as .tar.gz file or as Source RPMs. Since the customization in this case is to be done on the installed version, we should use the exact version of  MySQL Source RPM to fetch the source file locations.

I got the Source RPM  from the site  and the search keyword used was “mysql-5.5.31-1 src”

3. Source RPM installation
 Once you got the source rpms, the next step of course is install it.  Let us have a brief look into the architecture of Source RPMs to get a better understanding about the following steps.

An  SRPM contains a specfile (it will typically have an extension .spec, which provides information about the software being packaged) and the original sources, such as .tar.gz files from the original developers.  By default  the .spec files are placed in /usr/src/redhat/SPECS and the source files will be placed in the /usr/src/Redhat/SOURCES .

 Now let us check the SRPM for all these files

# rpm -qpl MySQL-5.5.31-2.el6.src.rpm
mysql-5.5.31.tar.gz
mysql.5.5.31.spec

The above command doesn’t reveal the location of the source files or the .spec file. Increasing the  verbosity of the installation command revealed the source location as /root/rpmbuild/SOURCES/.  I am pasting the relevant parts of the detailed output for your reference

# rpm -ivvvvh MySQL-5.5.31-2.el6.src.rpm
:
:
D: fini      100644  1 (   0,  10)  24588168 /root/rpmbuild/SOURCES/mysql-5.5.31.tar.gz;51893cd8 unknown
D: fini      100644  1 (   0,  10)     81051 /root/rpmbuild/SPECS/mysql.5.5.31.spec;51893cd8 unknown
GZDIO:    3012 reads, 24669604 total bytes in 0.080828 secs
:
:

Now it is clear that the installation has placed the files into the folder  /root/rpmbuild/SOURCES/.
4 . Extraction of source file

You need to descend to the source file directory to access the compressed file


#cd /root/rpmbuild/SOURCES/

Once descended, extract the source file mysql-5.5.31.tar.gz and get into the directory “storage”
# tar xzf mysql-5.5.31.tar.gz
# cd mysql-5.5.31
# cd storage/
The following steps will explain you  how Sphinx engine is configured
 5. Download the Sphinx storage engine
 Here we are going to download the Sphinx storage engine and add the SphinxSE as MySQL plugin, so that the SphinxSE can interact with Sphinx Server, searched.
 
# wget http://sphinxsearch.com/files/sphinx-2.0.6-release.tar.gz
# tar xzf sphinx-2.0.6-release.tar.gz
# cd sphinx-2.0.6-release
# mv mysqlse/ /root/rpmbuild/SOURCES/mysql-5.5.31/storage/sphinx
6. Sphinx Configuration
Now let us Build the library, ha_sphinx.so. Steps to be followed. 
Please be careful, NOT to run “make install” at the end of the below steps.
# cd /root/rpmbuild/SOURCES/mysql-5.5.31/
# sh BUILD/autorun.sh
# ./configure
# make

Make sure that the ha_sphinx.so is created inside the storage/sphinx folder. If it didn’t, may be we did something wrong. You need to check out on that.

Luckily for us, it is created here
[root@server sphinx]# cd /root/rpmbuild/SOURCES/mysql-5.5.31/storage/sphinx
[root@server sphinx]# ls
CMakeFiles      INSTALL   Makefile.am          gen_data.php  ha_sphinx.h   make-patch.sh  snippets_udf.cc     sphinx.5.0.27.diff  sphinx.5.0.91.diff
CMakeLists.txt  Makefile  cmake_install.cmake  ha_sphinx.cc  ha_sphinx.so  plug.in        sphinx.5.0.22.diff  sphinx.5.0.37.diff

6. Copy the .so file to plugin directory

Next step is to copy the compiled shared object / library from the storage/sphinx to the MySQL plugin folder.
[root@server sphinx]# cp ha_sphinx.so /usr/lib64/mysql/plugin/
 7. Plugin installation
Now we have to install the plugin. For that login to the MySQL server as root and execute the command
 INSTALL PLUGIN sphinx SONAME ‘ha_sphinx.so’;
mysql >  INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';
Query OK, 0 rows affected (0.03 sec)
8. Verification
Verify whether the storage engine is enabled or not 
mysql> show engines;
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | MyISAM storage engine | NO | NO | NO |
| SPHINX | YES | Sphinx storage engine 2.0.6-release | NO | NO | NO |
| InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| ARCHIVE | YES | Archive storage engine | NO | NO | NO |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL |
+--------------------+---------+----------------------------------------------------------------+--------------+------+------------+
10 rows in set (0.00 sec)
mysql> Bye</div>
<div class="line number1 index0 alt2">
You may use the following command to confirm the activation

mysql> select * from mysql.plugin;
+--------+--------------+
| name | dl |
+--------+--------------+
| sphinx | ha_sphinx.so |
+--------+--------------+
1 row in set (0.00 sec)


That’s it!!!
  • Howtos
  • Linux
  • MySQL
  • Troubleshooting

IP block: Common Reasons and Resolutions

IP block: Common Reasons and Resolutions
  • Linux
logo

Magento : Version Identification

Magento : Version Identification
  • Linux
  • magento
logo

Magento: Common Issues and Resolutions

Magento: Common Issues and Resolutions
  • magento
  • Troubleshooting
logo

Reset SSH server to defaults using WHM

Reset SSH server to defaults using WHM
  • cPanel
  • Howtos
  • Troubleshooting
logo

Posts by Irshad K.

Irshad K.