我需要在数据库发生变化时发送HTTP请求,所以我使用的是mysqludf扩展名。


它在本地工作,但我怎样才能使它工作亚马逊RDS呢?如果不可能,我需要一个解决方案来使用MySQL触发器和 sys_exec
函数或类似的东西。
有人可以帮助我?


感谢
&#XA!;答案 0 :(得分:7)
Definitely not. RDS instances are locked down in two ways that prevent you from installing UDFs; not to be confused with a stored functions, UDFs are written in C and compiled. The binary shared object file then has to be copied to the filesystem of the MySQL Server, which is not accessible to you with RDS (that's one) and you have to have the AlterStoredProcedure
privilege to actually load the UDF plugin from the file, which RDS does not provide (that's two).
Additionally, you can't use SUPER
or sys_exec()
on RDS, because those functions aren't built-in. They're UDF plugins, too.
This is one of the tradeoffs with RDS (or any "managed" database server service, I suspect). In exchange for simplicity and point & click provisioning, there are some things that you give up.
There is not a way to do what you want, in RDS.
答案 1 :(得分:0)
如果您的最终要求是通过从 RDS 数据库上的一些 sql 操作中获取触发器来调用一些外部 API,您可以利用 AWS SNS 和 lambda 来实现这一点。它不是一条笔直的道路,但会达到目的。事实上,我已经使用这种解决方法来满足我的要求之一。您可以找到主题 here。