Configuring the Sphinx daemon
In order to use Sphinx, we need to add a user to our MariaDB database and configure the Sphinx daemon so that it indexes the content we want it to.
Getting ready
Install the SphinxSE as described in the Installing SphinxSE in MariaDB recipe in this chapter. Install the Sphinx daemon as described in either the Installing the Sphinx daemon on Linux recipe or the Installing the Sphinx daemon on Windows recipe, both in this chapter, depending on which operating system we are using.
How to do it...
Open the
mysql
command-line client and create a user withSELECT
rights for the tables in the databases we want the Sphinx daemon to index, using the following statements:CREATE USER 'sphinx'@localhost IDENTIFIED BY 'sphinxsecretpassword'; GRANT SELECT on test.* to 'sphinx'@localhost;
Move the default
sphinx.conf
file out of the way; for example, the following will work on Linux:sudo mv -vi sphinx.conf sphinx.conf.dist
Create a new
sphinx.conf
file in a text editor ...