安装 Mysql 组复制插件

安装 Mysql 组复制插件

当我在 mysql 中给出 INSTALL PLUGIN group_replication SONAME 'group_replication.so'; 命令时,出现以下错误错误 当我导航到目录时,没有名为 group_replication.so 的包。我使用的是 Ubuntu 16.04 和 mysql 5.7.21。如何从源安装包,或者是否有其他方法可以解决此问题并继续进行复制?

答案1

我也遇到了这个问题,这里解释得更详细:https://stackoverflow.com/questions/46535713/mysql-group-replication-plugin-not-found-in-version-5-7-19-5-7-21

我了解到并非所有版本的 mysql 都捆绑了组复制。我不得不安装“MySQL 社区版”

#[OPTIONAL] Completely remove current MySQL installation:
sudo service mysql stop
apt remove --purge mysql-\*
rm -rf /etc/mysql
rm -rf /var/log/mysql
rm -rf /var/lib/mysql
sudo apt-get clean
sudo apt-get autoclean

#Install MySQL Community Version 5.7.X:
sudo apt-get install libaio1
sudo apt-get install libmecab2
curl -OL https://downloads.mysql.com/archives/get/file/mysql-common_5.7.20-1ubuntu16.04_amd64.deb
curl -OL https://downloads.mysql.com/archives/get/file/mysql-community-client_5.7.20-1ubuntu16.04_amd64.deb
curl -OL https://downloads.mysql.com/archives/get/file/mysql-client_5.7.20-1ubuntu16.04_amd64.deb
curl -OL https://downloads.mysql.com/archives/get/file/mysql-community-server_5.7.20-1ubuntu16.04_amd64.deb
sudo dpkg -i mysql-common_5.7.20-1ubuntu16.04_amd64.deb
sudo dpkg -i mysql-community-client_5.7.20-1ubuntu16.04_amd64.deb
sudo dpkg -i mysql-client_5.7.20-1ubuntu16.04_amd64.deb
sudo dpkg -i mysql-community-server_5.7.20-1ubuntu16.04_amd64.deb 

然后您应该找到该插件并能够安装它:

[email protected]:/var/log/mysql# ls -lah /usr/lib/mysql/plugin/
...
-rw-r--r-- 1 root root 1.7M Sep 13  2017 group_replication.so
....

相关内容