MariaDB starting with 5.3.0
After MariaDB is installed, use the INSTALL PLUGIN command (as the root user) to install the HandlerSocket plugin. This command only needs to be run once, like so:
INSTALL PLUGIN handlersocket SONAME 'handlersocket.so';
In older versions, after installing the plugin, SHOW PROCESSLIST would show the HandlerSocket worker threads. With the latest versions, you first need to configure some settings. All HandlerSocket configuration options are placed in the [mysqld] section of your my.cnf file.
handlersocket_address="127.0.0.1" handlersocket_port="9998" handlersocket_port_wr="9999"
After updating the configuration options, restart MariaDB.
On the client side, to make use of the plugin you will need to install the appropriate client library (i.e. libhsclient for C++ applications and perl-Net-HandlerSocket for perl applications, both available from the HandlerSocket website).