In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces Mysql how to install other engines online, the article is very detailed, has a certain reference value, interested friends must read it!
Mysql online installation of sphinx storage engine
Sphinx's storage engine needs to be installed in the existing mysql to ensure that the existing mysql is running. Mysql does support online hot swapping of the storage engine. Here are the installation steps:
1. View the running version of the existing mysql
[root@localhost plugin] # mysqladmin-uroot-proot version
Warning: Using a password on the command line interface can be insecure.
Mysqladmin Ver 8.42 Distrib 5.6.16, for Linux on x86_64
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
Affiliates. Other names may be trademarks of their respective
Owners.
Server version 5.6.16
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket / var/lib/mysql/mysql.sock
Uptime: 1 day 6 hours 26 min 58 sec
Threads: 1 Questions: 35 Slow queries: 0 Opens: 67 Flush tables: 1 Open tables: 60 Queries per second avg: 0.000
2. Download mysql and sphinx
Mysql:wget http://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-5.6.16.tar.gz
Sphinx: http://sphinxsearch.com/downloads/release/ goes in and downloads:
Sphinx 2.1.7-release (r4638; Mar 30, 2014) Source tarball (tar.gz) 2.1.7-release2.3MDownload
Note: the version of the mysql source package must be the same as the currently running mysql version!
Decompression
# tar-xzvf mysql-5.6.16.tar.gz
# tar-xzvf sphinx-2.1.7-release.tar.gz
3. Copy the mysqlse directory under sphinx-2.1.7-release to the mysql directory
# cp-r sphinx-2.1.7-release/mysqlse/ mysql-5.6.16/storage/sphinx
Build
# cd mysql-5.6.16
# sh BUILD/autorun.sh
#. / configure (some dependent packages of yum may be required for this step, otherwise there will be errors or warnings)
# make
Note: you can go to make here without install.
4. Copy the make files to the currently running mysql directory
[root@localhost sphinx] # pwd
/ u/opt/mysql-5.6.16/storage/sphinx
Cp ha_sphinx.so / usr/lib64/mysql/plugin/
Change the owner (try or not to change here)
# chown mysql.mysql / usr/lib64/mysql/plugin/*
Note: the mysql directory I am currently running is in / usr/local/mysql
5. Log in to mysql to load the sphinx engine module
Mysql > show engines
+-- +
| | Engine | Support | Comment | Transactions | XA | Savepoints | |
+-- +
| | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| | CSV | YES | CSV storage engine | NO | NO | NO | |
| | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| | BLACKHOLE | YES | / dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | |
| | MyISAM | YES | MyISAM storage engine | NO | NO | NO | |
| | ARCHIVE | YES | Archive storage engine | NO | NO | NO | |
| | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | |
| | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | |
+-- +
9 rows in set (0.01 sec)
Mysql > INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'
ERROR 1126 (HY000): Can't open shared library'/ usr/lib64/mysql/plugin/ha_sphinx.so' (errno: 2 / usr/lib64/mysql/plugin/ha_sphinx.so: cannot open shared object file: No such file or directory)
Here, ERROR found that it was the wrong ha_sphinx.so location for the first time, and after the copy was correct:
Mysql > INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'
Query OK, 0 rows affected (0.05 sec)
Mysql > show engines
+-- +
| | Engine | Support | Comment | Transactions | XA | Savepoints | |
+-- +
| | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| | CSV | YES | CSV storage engine | NO | NO | NO | |
| | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| | BLACKHOLE | YES | / dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | |
| | SPHINX | YES | Sphinx storage engine 2.1.7-release | NO | NO | NO | |
| | MyISAM | YES | MyISAM storage engine | NO | NO | NO | |
| | ARCHIVE | YES | Archive storage engine | NO | NO | NO | |
| | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | |
| | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | |
+-- +
10 rows in set (0.00 sec)
Mysql >
Installation complete! If you want to uninstall the enclosure to use
Mysql > UNINSTALL PLUGIN sphinx
After installation, a few days later:
Mysql > show engines
+-- +
| | Engine | Support | Comment | Transactions | XA | Savepoints | |
+-- +
| | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| | CSV | YES | CSV storage engine | NO | NO | NO | |
| | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| | BLACKHOLE | YES | / dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | |
| | MyISAM | YES | MyISAM storage engine | NO | NO | NO | |
| | ARCHIVE | YES | Archive storage engine | NO | NO | NO | |
| | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | |
| | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | |
+-- +
9 rows in set (0.00 sec)
Mysql >
I don't know why I can't find the SPHINX engine.
Only reinstall it and see it again, so refer to the
Mysql > INSTALL PLUGIN sphinx SONAME 'ha_sphinx.so'
ERROR 1062 (23000): Duplicate entry 'sphinx' for key' PRIMARY'
Mysql >
Mysql > UNINSTALL PLUGIN sphinx
ERROR 1305 (42000): PLUGIN sphinx does not exist
Mysql >
Mysql >
Mysql > select * from mysql.plugin
+-+ +
| | name | dl |
+-+ +
| | sphinx | ha_sphinx.so |
+-+ +
1 row in set (0.00 sec)
Mysql > UNINSTALL PLUGIN sphinx
ERROR 1305 (42000): PLUGIN sphinx does not exist
Mysql >
Mysql >
Mysql > select * from mysql.plugin
+-+ +
| | name | dl |
+-+ +
| | sphinx | ha_sphinx.so |
+-+ +
1 row in set (0.00 sec)
Mysql >
Mysql > delete from mysql.plugin where name='SPHINX'
Query OK, 1 row affected (0.02 sec)
Mysql >
Mysql >
Mysql > select * from mysql.plugin
Empty set (0.00 sec)
Mysql > install plugin SPHINX soname 'ha_sphinx.so'
Query OK, 0 rows affected (0.00 sec)
Mysql > show engines
+-- +
| | Engine | Support | Comment | Transactions | XA | Savepoints | |
+-- +
| | InnoDB | DEFAULT | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| | CSV | YES | CSV storage engine | NO | NO | NO | |
| | MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
| | BLACKHOLE | YES | / dev/null storage engine (anything you write to it disappears) | NO | NO | NO |
| | MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO | |
| | SPHINX | YES | Sphinx storage engine 2.1.7-release | NO | NO | NO | |
| | MyISAM | YES | MyISAM storage engine | NO | NO | NO | |
| | ARCHIVE | YES | Archive storage engine | NO | NO | NO | |
| | FEDERATED | NO | Federated MySQL storage engine | NULL | NULL | NULL | |
| | PERFORMANCE_SCHEMA | YES | Performance Schema | NO | NO | NO | |
+-- +
10 rows in set (0.00 sec)
Mysql >
Before starting the installation, check the mysql.plugin table to see if there is an old version of SPHINXSE that has not been completely cleaned up.
The above is all the contents of the article "how to install other engines on Mysql online". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.