GreatSQL社区

搜索

[已解决] 为什么插件不在plugin_dir里面查找?

548 4 2023-4-11 11:45
mysql> install plugin keyring_file soname 'keyring_file.so';
ERROR 1123 (HY000): Can't initialize function 'keyring_file'; Plugin initialization function failed.


mysql> show variables like '%plugin%';
+-----------------------------------------------+--------------------------+
| Variable_name                                 | Value                    |
+-----------------------------------------------+--------------------------+
| default_authentication_plugin                 | caching_sha2_password    |
| plugin_dir                                    | /mysql/mysql/lib/plugin/ |
| replication_optimize_for_static_plugin_config | OFF                      |
+-----------------------------------------------+--------------------------+
3 rows in set (0.00 sec)




2023-04-11T03:34:33.430511Z 11 [ERROR] [MY-010202] [Server] Plugin 'keyring_file' init function returned error.
2023-04-11T03:44:33.755720Z 12 [ERROR] [MY-011370] [Server] Plugin keyring_file reported: 'File '/usr/local/mysql/keyring/keyring' not found (OS errno 2 - No such file or directory)'
2023-04-11T03:44:33.755757Z 12 [ERROR] [MY-011355] [Server] Plugin keyring_file reported: 'keyring_file initialization failure. Please check if the keyring_file_data points to readable keyring file or keyring file can be created in the specified location. The keyring_file will stay unusable until correct path to the keyring file gets provided'
2023-04-11T03:44:33.755766Z 12 [ERROR] [MY-010202] [Server] Plugin 'keyring_file' init function returned error.


全部回复(4)
yejr 2023-4-11 14:08:41
看你的配置是
plugin_dir                                    | /mysql/mysql/lib/plugin/


但报错信息却是
'File '/usr/local/mysql/keyring/keyring' not found


感觉有点凌乱啊,先把basedir整清楚。
mahone 2023-4-11 14:19:04
yejr 发表于 2023-4-11 14:08
看你的配置是
plugin_dir                                    | /mysql/mysql/lib/plugin/

[root@mysql8 data]# cat /mysql/my.cnf
[mysqld]
user=mysql
server_id=3306
port=3306
basedir=/mysql/mysql
datadir=/mysql/data
socket=/tmp/mysql.sock
log-error=/mysql/data/error.log
[mysql]
socket=/tmp/mysql.sock



而且我加载其他插件没问题,就这一个有问题
mysql> INSTALL PLUGIN group_replication SONAME 'group_replication.so';
Query OK, 0 rows affected (0.01 sec)

mysql> install plugin keyring_file soname 'keyring_file.so';
ERROR 1123 (HY000): Can't initialize function 'keyring_file'; Plugin initialization function failed.

是不是这个插件需要做什么配置才行?
王权富贵 2023-4-12 11:52:43
mahone 发表于 2023-4-11 14:19
[root@mysql8 data]# cat /mysql/my.cnf
[mysqld]
user=mysql

[mysqld]
early-plugin-load=keyring_file.so
keyring_file_data=/mysql/key/keyring


配置文件里加这个试试
yejr 2023-4-12 15:11:13
mahone 发表于 2023-4-11 14:19
[root@mysql8 data]# cat /mysql/my.cnf
[mysqld]
user=mysql

看了下,可能是你使用方法不对,可以参考文档:Installing or Uninstalling General-Purpose Keyring Functions,中的这部分内容,例如

INSTALL PLUGIN keyring_udf SONAME 'keyring_udf.so';

也可以上面这位同学的方法。
mahone

4

主题

0

博客

13

贡献

新手上路

Rank: 1

积分
22

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-5-21 16:13 , Processed in 0.019002 second(s), 15 queries , Redis On.
快速回复 返回顶部 返回列表