Stuff I'm Up To

Technical Ramblings

MariaDB Apparmor and No login — February 22, 2018

MariaDB Apparmor and No login

As I’ve been messing around with Sphinx I discovered that MariaDB actually includes the SphinxSE plugin out of the box. So I figured I’d ditch my MySQL installation on Debian and go back to the default Debian repository version MariaDB.

$ sudo apt-get remove mysql-server mysql-client

$ sudo apt-get install mariadb-server mariadb-client

This didn’t go to plan. Firstly it failed to run the apt configure scripts for mariadb-server-10.1 so it would not complete the install.

Checking the logs

Feb 21 15:52:29 mypc kernel: [ 323.603758] audit: type=1400 audit(1519228349.780:26): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/etc/mysql/mariadb.conf.d/" pid=5175 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

It goes back to a previous post I made about apparmor and MySQL. This time the problem was because the config file paths/names are different.

name="/etc/mysql/mariadb.conf.d/

Continue reading

Advertisements
The Power of Sphinx — February 21, 2018

The Power of Sphinx

I’ve only really used Sphinx as part of a home project with MySQL. But today found that searching for text in 28 million rows in a PostgreSQL table needs something with a bit more performance that the base SQL server.

Installing Sphinx on Debian is very straight forward if you want the default repository version and not the leading edge version. I saw no reason why not.

$ sudo apt-get install sphinxsearch

Now getting it working takes some fettling of the /etc/sphinxsearch/sphinx.conf file. It doesn’t exist by default so you need to create it either by copying the sphinx.conf.dist file or start fresh.

You also then need to edit the /etc/default/sphinxsearch file and set START=yes.

Continue reading