MariaDB:如何在 Arch 上安装 OQGRAPH 作为数据库引擎 Linux
MariaDB: How to install OQGRAPH as DB Engine on Arch Linux
是否可以在 Arch Linux 上为 MariaDB 安装 OQGRAPH?如果是,怎么做?
这是我目前安装的引擎:
MariaDB [(none)]> show engines;
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | Stores tables as CSV files | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO |
| ARCHIVE | YES | gzip-compresses tables for a low storage footprint | NO | NO | NO |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
10 rows in set (0.00 sec)
按照我找到的安装 oqgraph 的说明,这是我的结果:
MariaDB [(none)]> install plugin oqgraph soname 'ha_oqgraph.so';
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/ha_oqgraph.so' (errno: 2, cannot open shared object file: No such file or directory)
该文件不存在:
ls /usr/lib/mysql/plugin/ha_oqgraph.so
ls: cannot access '/usr/lib/mysql/plugin/ha_oqgraph.so': No such file or directory
这两个 return 没有结果:
pacman -Ss oqgraph
pacman -Ss "open query graph"
相关页面:
Arch Wiki 页面上没有提到 OQGraph:
https://wiki.archlinux.org/index.php/MySQL
No OQGraph in my MariaDB?
接受的解决方案对我不起作用。
https://mariadb.com/kb/en/library/installing-oqgraph/
该页面不提供 Arch Linux 解决方案
这是一种变通方法,不是理想的解决方案。但是,它有效。
将下载的库版本与您安装的 MariaDB 版本相匹配。
下载libJudy.so.1
。我没有在 Arch 仓库中找到 libJudy。 更新:来自 Kevin Andrews(见评论):
libJudy is now in the community repo so a sudo pacman -S community/judy is enough.
留下我以前的步骤,以防它们对任何人有帮助。否则跳转到下面的下一个。
以前,我用的是http://ftp.br.debian.org/debian/pool/main/j/judy/libjudydebian1_1.0.5-5_amd64.deb。然后按照这些步骤安装库。
extract libJudy.so.1.0.3
cd /lib
sudo mv libJudy.so.1.0.3 .
sudo ln -s libJudy.so.1.0.3 libJudy.so.1
sudo chmod 644 libJudy.so.1.0.3
下一个你需要ha_oqgraph.so
。我下载了 MariaDB 的完整官方压缩包来获取该文件,将版本与从 Arch 存储库安装的 MariaDB 版本相匹配。
extract ha_oqgraph.so
sudo mv ha_oqgraph.so /usr/lib/mysql/plugin/ha_oqgraph.so
sudo chmod 755 /usr/lib/mysql/plugin/ha_oqgraph.so
以 root 身份登录 MariaDB 并且 运行:
MariaDB > install plugin oqgraph soname 'ha_oqgraph.so';
Query OK, 0 rows affected (0.00 sec)
然后 运行 确认 OQGRAPH 已安装:
MariaDB > show engines;
这是我的结果:
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | Stores tables as CSV files | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO |
| ARCHIVE | YES | gzip-compresses tables for a low storage footprint | NO | NO | NO |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| OQGRAPH | YES | Open Query Graph Computation Engine (http://openquery.com/graph) | NO | NO | NO |
| SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
11 rows in set (0.02 sec)
是否可以在 Arch Linux 上为 MariaDB 安装 OQGRAPH?如果是,怎么做?
这是我目前安装的引擎:
MariaDB [(none)]> show engines;
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | Stores tables as CSV files | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO |
| ARCHIVE | YES | gzip-compresses tables for a low storage footprint | NO | NO | NO |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
10 rows in set (0.00 sec)
按照我找到的安装 oqgraph 的说明,这是我的结果:
MariaDB [(none)]> install plugin oqgraph soname 'ha_oqgraph.so';
ERROR 1126 (HY000): Can't open shared library '/usr/lib/mysql/plugin/ha_oqgraph.so' (errno: 2, cannot open shared object file: No such file or directory)
该文件不存在:
ls /usr/lib/mysql/plugin/ha_oqgraph.so
ls: cannot access '/usr/lib/mysql/plugin/ha_oqgraph.so': No such file or directory
这两个 return 没有结果:
pacman -Ss oqgraph
pacman -Ss "open query graph"
相关页面:
Arch Wiki 页面上没有提到 OQGraph:
https://wiki.archlinux.org/index.php/MySQL
No OQGraph in my MariaDB?
接受的解决方案对我不起作用。
https://mariadb.com/kb/en/library/installing-oqgraph/
该页面不提供 Arch Linux 解决方案
这是一种变通方法,不是理想的解决方案。但是,它有效。
将下载的库版本与您安装的 MariaDB 版本相匹配。
下载libJudy.so.1
。我没有在 Arch 仓库中找到 libJudy。 更新:来自 Kevin Andrews(见评论):
libJudy is now in the community repo so a sudo pacman -S community/judy is enough.
留下我以前的步骤,以防它们对任何人有帮助。否则跳转到下面的下一个。
以前,我用的是http://ftp.br.debian.org/debian/pool/main/j/judy/libjudydebian1_1.0.5-5_amd64.deb。然后按照这些步骤安装库。
extract libJudy.so.1.0.3
cd /lib
sudo mv libJudy.so.1.0.3 .
sudo ln -s libJudy.so.1.0.3 libJudy.so.1
sudo chmod 644 libJudy.so.1.0.3
下一个你需要ha_oqgraph.so
。我下载了 MariaDB 的完整官方压缩包来获取该文件,将版本与从 Arch 存储库安装的 MariaDB 版本相匹配。
extract ha_oqgraph.so
sudo mv ha_oqgraph.so /usr/lib/mysql/plugin/ha_oqgraph.so
sudo chmod 755 /usr/lib/mysql/plugin/ha_oqgraph.so
以 root 身份登录 MariaDB 并且 运行:
MariaDB > install plugin oqgraph soname 'ha_oqgraph.so';
Query OK, 0 rows affected (0.00 sec)
然后 运行 确认 OQGRAPH 已安装:
MariaDB > show engines;
这是我的结果:
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| MRG_MyISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | Stores tables as CSV files | NO | NO | NO |
| BLACKHOLE | YES | /dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| MyISAM | YES | Non-transactional engine with good performance and small data footprint | NO | NO | NO |
| ARCHIVE | YES | gzip-compresses tables for a low storage footprint | NO | NO | NO |
| Aria | YES | Crash-safe tables with MyISAM heritage | NO | NO | NO |
| InnoDB | DEFAULT | Percona-XtraDB, Supports transactions, row-level locking, foreign keys and encryption for tables | YES | YES | YES |
| PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO |
| OQGRAPH | YES | Open Query Graph Computation Engine (http://openquery.com/graph) | NO | NO | NO |
| SEQUENCE | YES | Generated tables filled with sequential values | YES | NO | YES |
+--------------------+---------+--------------------------------------------------------------------------------------------------+--------------+------+------------+
11 rows in set (0.02 sec)