How to install sphinx directly without compiling and reinstalling the MySQL database

Source: Internet
Author: User

If you want to installSphinxFull-text search engine), but you do not want to re-compile and installMySQL databaseWhat should I do? The answer is that if your mysql version is 5.0.45 or above, you will not need to re-compile and install it. If your mysql version is earlier than 5.0, you will have to re-compile and install it. To install the storage engine of sphinx in the existing mysql, ensure that the existing mysql runs properly. Mysql does support online hot swapping of storage engines. The following describes the installation steps:

Note: The version of the mysql source code package must be consistent with the current mysql version!

First download the sphinx plug-in package, I am running a mysql-5.1.48

Download: Sphget: wget http://sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz

Extract: Tar-xzvf sphinx-0.9.9.tar.gz

Create a sphinx Folder:

 
  1. mkdir mysql-5.1.48/storage/sphinx 

Copy all files under mysqlse under the sphscripts directory to the storage/sphinx directory of mysql:

 
  1. cp -r sphinx-0.9.9/mysqlse/ mysql-5.1.48/storage/sphinx 

Go to the extract directory of the mysql source package:

 
  1. cd mysql-5.1.48   
  2.  
  3. sh BUILD/autorun.sh   
  4.  
  5. ./configure   
  6.  
  7. make 

Note: Here, make is the step. You do not need to install it.

Copy the make file to the currently running mysql directory:

 
  1. cp storage/sphinx/.libs/ha_sphinx.* /usr/local/mysql/lib/plugin  

Change owner:

 
  1. chown mysql.mysql /usr/local/mysql/lib/plugin/*  

Log onto mysql to load the sphinx engine module:

 
  1. /usr/local/mysql/bin/mysql -u root -p -h localhost 

Load the sphinx storage module:

 
  1. mysql> INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so';  

Check whether the engine module is loaded properly:

 
  1. mysql> show engines;  

Installation complete! To uninstall the storage module, use:

 
  1. mysql> UNINSTALL PLUGIN sphinx;  

You can uninstall it.

This article introduces how to install sphinx on MySQL. I hope this article will help you. Thank you!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.