gpt4 book ai didi

mysql - 无法在 Azure Mysql DB 中创建触发器

转载 作者:行者123 更新时间:2023-12-04 09:36:43 24 4
gpt4 key购买 nike

我有一个在 azure 中运行的 MySQL 数据库。我一直在尝试创建一些非常基本的触发器,我已经在 MySQL 的本地实例上对其进行了测试,它的工作方式就像它们应该做的那样。

但是,在 Azure 的 MySQL 数据库中创建触发器似乎不是一个选项。

> CREATE TRIGGER update_last_modified_xxx
-> BEFORE UPDATE ON xxx
-> FOR EACH ROW
-> BEGIN
-> SET new.last_modified = NOW();
-> END;
->


(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)') (edited)

并且由于limitations而无法更改log_bin_trust_function_creators由 MS 设置。我是否在这里遗漏了一些东西,或者是否可以在 Azure 中运行的 MySQL 数据库中创建触发器?

最佳答案

我只是通过 Azure Portal 中的“服务器参数”选项卡手动将 log_bin_trust_function_creators 参数设置为“ON”并解决了问题。

关于mysql - 无法在 Azure Mysql DB 中创建触发器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62542666/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com