问题描述:mysql在安装group_replication插件时,报错"version libcrypto.so.10 not defined in file libcrypto.so",如下所示:
数据库:mysql 8.0.27
系统:rhel 7.3 64位
1、异常重现
mysql> install plugin group_replication soname 'group_replication.so';
ERROR 1126 (HY000): Can't open shared library '/usr/lib64/mysql/plugin/group_replication.so' (errno: 2 /usr/lib64/mysql/plugin/group_replication.so: symbol X509_check_ip_asc, version libcrypto.so.10 not defined in file libcrypto.so)

说明:告警显示libcrypto.so.10没有在文件libcrypto.so中定义.

2、原因分析
经查询资料,确认openssl版本问题会导致该异常.
--查openssl版本
[root@MySQL-827MGR-Master ~]# rpm -q openssl
openssl-1.0.1e-60.el7.x86_64
[root@MySQL-827MGR-Master lib64]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[root@MySQL-827MGR-Master lib64]# rpm -q --provides openssl
openssl = 1:1.0.1e-60.el7
openssl(x86-64) = 1:1.0.1e-60.el7
--查相关文件
[root@MySQL-827MGR-Master lib64]# ll libssl.so*
lrwxrwxrwx. 1 root root     16 Aug 12 08:09 libssl.so.10 -> libssl.so.1.0.1e
-rwxr-xr-x. 1 root root 454024 Sep 22  2016 libssl.so.1.0.1e
[root@MySQL-827MGR-Master lib64]# ll libcrypto.so.10
lrwxrwxrwx. 1 root root 19 Aug 12 08:09 libcrypto.so.10 -> libcrypto.so.1.0.1e
[root@MySQL-827MGR-Master lib64]# rpm -q --provides openssl-libs | grep libcrypto.so.10
libcrypto.so.10()(64bit)
libcrypto.so.10(OPENSSL_1.0.1)(64bit)
libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit)
libcrypto.so.10(libcrypto.so.10)(64bit)

3、解决方案
将openssl-1.0.1升级到openssl-1.0.2
sftp> lcd F:\package
sftp> put openssl-libs-1.0.2k-19.el7.x86_64.rpm
[root@MySQL-827MGR-Master ~]# rpm -ivh openssl-libs-1.0.2k-19.el7.x86_64.rpm --force
warning: openssl-libs-1.0.2k-19.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:openssl-libs-1:1.0.2k-19.el7     ################################# [100%]

注意:强制安装openssl-libs-1.0.2k-19.el7.x86_64.rpm后,版本依然显示1.0.1
[root@MySQL-827MGR-Master ~]# rpm -q --provides openssl
openssl = 1:1.0.1e-60.el7
openssl(x86-64) = 1:1.0.1e-60.el7
[root@MySQL-827MGR-Master ~]# openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013
[root@MySQL-827MGR-Master ~]# rpm -q --provides openssl
openssl = 1:1.0.1e-60.el7
openssl(x86-64) = 1:1.0.1e-60.el7

4、安装验证
--重新安装group_replication插件.
Master[(none)]> INSTALL PLUGIN group_replication SONAME 'group_replication.so';
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
Enter password: 
Connection id:    8
Current database: *** NONE ***

Query OK, 0 rows affected (12.84 sec)

Master[(none)]> show plugins;
+---------------------------------+----------+--------------------+----------------------+---------+
| Name                            | Status   | Type               | Library              | License |
+---------------------------------+----------+--------------------+----------------------+---------+
| binlog                          | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| mysql_native_password           | ACTIVE   | AUTHENTICATION     | NULL                 | GPL     |
| sha256_password                 | ACTIVE   | AUTHENTICATION     | NULL                 | GPL     |
| caching_sha2_password           | ACTIVE   | AUTHENTICATION     | NULL                 | GPL     |
| sha2_cache_cleaner              | ACTIVE   | AUDIT              | NULL                 | GPL     |
| daemon_keyring_proxy_plugin     | ACTIVE   | DAEMON             | NULL                 | GPL     |
| CSV                             | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| MEMORY                          | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| InnoDB                          | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| INNODB_TRX                      | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CMP                      | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CMP_RESET                | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CMPMEM                   | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CMPMEM_RESET             | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CMP_PER_INDEX            | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CMP_PER_INDEX_RESET      | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_BUFFER_PAGE              | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_BUFFER_PAGE_LRU          | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_BUFFER_POOL_STATS        | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_TEMP_TABLE_INFO          | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_METRICS                  | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_FT_DEFAULT_STOPWORD      | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_FT_DELETED               | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_FT_BEING_DELETED         | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_FT_CONFIG                | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_FT_INDEX_CACHE           | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_FT_INDEX_TABLE           | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_TABLES                   | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_TABLESTATS               | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_INDEXES                  | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_TABLESPACES              | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_COLUMNS                  | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_VIRTUAL                  | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_CACHED_INDEXES           | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| INNODB_SESSION_TEMP_TABLESPACES | ACTIVE   | INFORMATION SCHEMA | NULL                 | GPL     |
| MyISAM                          | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| MRG_MYISAM                      | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| PERFORMANCE_SCHEMA              | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| TempTable                       | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| ARCHIVE                         | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| BLACKHOLE                       | ACTIVE   | STORAGE ENGINE     | NULL                 | GPL     |
| FEDERATED                       | DISABLED | STORAGE ENGINE     | NULL                 | GPL     |
| ngram                           | ACTIVE   | FTPARSER           | NULL                 | GPL     |
| mysqlx_cache_cleaner            | ACTIVE   | AUDIT              | NULL                 | GPL     |
| mysqlx                          | ACTIVE   | DAEMON             | NULL                 | GPL     |
| group_replication               | ACTIVE   | GROUP REPLICATION  | group_replication.so | GPL     |
+---------------------------------+----------+--------------------+----------------------+---------+
46 rows in set (0.01 sec)

说明:如上所示,MGR插件成功安装.

参考网址:
https://www.jianshu.com/p/360f160d76da
https://www.e-learn.cn/topic/3766457