如何修复Nextcloud升级filecache trigger创建失败错误?
- By : Will
- Category : Cloud storage
Cloud storage
1 前言
一个问题,一篇文章,一出故事。
笔者今天测试Nextlcoud的升级,执行以下修复命令
occ maintenance:repair --include-expensive
如果遇到如下错误提示,
#...
- Repair steps for Memories
- External table schema seems up to date
- WARNING: Failed to create filecache trigger (compatibility mode will be used): An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1419 You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
#...
2 最佳实践
2.1 设置触发器所需的`SUPER`权限
vim /etc/my.cnf.d/server.cnf
加入如下配置,
[mysqld] log_bin_trust_function_creators = 1
配置修改后,你需要重启服务使配置生效,
systemctl restart mariadb
然后,你可以使用如下命令确认设置的结果,
SHOW GLOBAL VARIABLES LIKE 'log_bin_trust_function_creators';
正常可见如下显示,
+---------------------------------+-------+ | Variable_name | Value | +---------------------------------+-------+ | log_bin_trust_function_creators | ON | +---------------------------------+-------+ 1 row in set (0.001 sec) MariaDB [(none)]>
如果你不方便重启mariadb,你可以使用如下命令使设置即时生效,
SET GLOBAL log_bin_trust_function_creators = 1;
2.2 再次执行修复命令
occ maintenance:repair --include-expensive
没有评论