- MariaDB Cookbook
- Daniel Bartholomew
- 433字
- 2021-07-16 12:19:25
Using INSTALL SONAME
The INSTALL SONAME
command is used to install plugins in MariaDB. In this recipe, we'll install the Cassandra storage engine.
How to do it...
- Connect to MariaDB using the
mysql
command-line client with a user that has theINSERT
privilege on themysql.plugins
table. The root user has this privilege, but other users might as well. - Install the Cassandra storage engine plugin using the following command line:
INSTALL SONAME 'ha_cassandra';
- Issue the
SHOW plugins;
command and look for the following text:| CASSANDRA | ACTIVE | STORAGE ENGINE | ha_cassandra.so | GPL |
- Next, issue the
SHOW STORAGE ENGINES;
command and look for the following text:| CASSANDRA | YES | Cassandra storage engine| NO | NO | NO |
- The preceding output indicates that the Cassandra storage engine is installed and ready to go. The three
NO
columns are about transactions, distributedXA
transactions, andsavepoints
, respectively. All three are features that the Cassandra storage engine does not support.
How it works...
When this command is run, the server looks in the configured plugin directory and loads the plugin with that name. We do not need to specify the file extension. The actual name of the ha_cassandra
file will either be ha_cassandra.dll
or ha_cassandra.so
on Windows and Linux respectively.
There's more...
Installing plugins is not very difficult in MariaDB but there are some things that can trip us up if we're not careful.
The name of a given plugin is defined in the data structures inside the plugin. The filename is the name of the file that contains the plugin. The two are similar, but they are not the same. For example, the name of the Cassandra storage engine plugin is CASSANDRA
and the filename is ha_cassandra.so
. The name is case insensitive, so when referring to it we can use CASSANDRA
, Cassandra
, cassandra
, or even CaSsAnDrA
if we want. The filename, on the other hand, is case sensitive if our underlying filesystem is case sensitive.
The INSTALL SONAME
command is just a variation of the INSTALL PLUGIN
command. The main difference is that INSTALL PLUGIN
requires two sets of information, the name and the filename, and INSTALL SONAME
just needs the filename. The filename must be quoted. Here is the recipe using INSTALL PLUGIN
:
INSTALL PLUGIN Cassandra SONAME 'ha_cassandra';
Apart from being shorter, INSTALL SONAME
is no different from INSTALL PLUGIN
, functionality-wise.
See also
- The complete documentation of the
INSTALL SONAME
command can be found at https://mariadb.com/kb/en/install-soname/ - The complete documentation of the Cassandra storage engine can be found at https://kb.askmonty.org/en/cassandra/
- Web交互界面設計與制作(微課版)
- Django:Web Development with Python
- SharePoint Development with the SharePoint Framework
- 全棧自動化測試實戰(zhàn):基于TestNG、HttpClient、Selenium和Appium
- BeagleBone Black Cookbook
- Java面向?qū)ο蟪绦蛟O計
- Cybersecurity Attacks:Red Team Strategies
- Java網(wǎng)絡編程實戰(zhàn)
- Java SE實踐教程
- SQL Server 2016 從入門到實戰(zhàn)(視頻教學版)
- DevOps 精要:業(yè)務視角
- Learning Node.js for Mobile Application Development
- Flink原理深入與編程實戰(zhàn):Scala+Java(微課視頻版)
- 移動應用界面設計
- Offline First Web Development